issue #3541 : Fix a bug when loading js from server.

Fix a bug when loading js from server.