Fix my js_loader patch

* still call the callback when skipping duplicate file.  This updates the completed flags, and so the overall "we're done" callback fires properly.
This commit is contained in:
Victor Shnayder
2012-10-12 22:52:02 -04:00
parent 1c18ad9607
commit 48de4b40ee

View File

@@ -62,5 +62,9 @@ class @JavascriptLoader
# Need to use the DOM elements directly or the scripts won't execute
# properly.
$('head')[0].appendChild(s)
$(placeholder).remove()
else
# just call the completion callback directly, without reloading the file
completionHandlerGenerator(index)()
$(placeholder).remove()