Skip to content

Commit ce9521c

Browse files
committed
Merge pull request #85 from MikeSpock/patch-1
The $scipt.path('/modules/') was not working for .js files
2 parents b29a095 + baaab3c commit ce9521c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/script.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848
setTimeout(function () {
4949
each(paths, function loading(path, force) {
5050
if (path === null) return callback()
51-
path = !force && path.indexOf('.js') === -1 && !/^https?:\/\//.test(path) && scriptpath ? scriptpath + path + '.js' : path
51+
52+
if (!force && !/^https?:\/\//.test(path) && scriptpath) {
53+
path = (path.indexOf('.js') === -1) ? scriptpath + path + '.js' : scriptpath + path;
54+
}
55+
5256
if (scripts[path]) {
5357
if (id) ids[id] = 1
5458
return (scripts[path] == 2) ? callback() : setTimeout(function () { loading(path, true) }, 0)

0 commit comments

Comments
 (0)