From 48de4b40eee54eaeefdd457bb2af44f28e764891 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Fri, 12 Oct 2012 22:52:02 -0400 Subject: [PATCH] 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. --- common/lib/xmodule/xmodule/js/src/javascript_loader.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/javascript_loader.coffee b/common/lib/xmodule/xmodule/js/src/javascript_loader.coffee index 55d79993ff..a687da3538 100644 --- a/common/lib/xmodule/xmodule/js/src/javascript_loader.coffee +++ b/common/lib/xmodule/xmodule/js/src/javascript_loader.coffee @@ -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() +