Skip to content

Commit 6db705c

Browse files
committed
Landed a patch for the double extension issue
I noticed that the in the last unit-test (double load), the .js extension got added twice. This patches fixes it.
1 parent 202c08f commit 6db705c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
setTimeout(function () {
4949
each(paths, function loading(path, force) {
5050
if (path === null) return callback()
51-
path = !force && !/^https?:\/\//.test(path) && scriptpath ? scriptpath + path + '.js' : path
51+
path = !force && path.indexOf('.js') === -1 && !/^https?:\/\//.test(path) && scriptpath ? scriptpath + path + '.js' : path
5252
if (scripts[path]) {
5353
if (id) ids[id] = 1
5454
if (scripts[path] == 2) callback()

0 commit comments

Comments
 (0)