closed #2431: Potential crash when loading js files.
Merge pull request #3250 from dumganhar/develop

closed 2431: Potential crash when loading js files.