Definition will not have an effect if already defined - force redefinition.

pull/738/head
Chad Weider 2012-05-28 16:38:02 -07:00
parent 774e2a1517
commit a28bbd0b3f
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@
* @params reqModuleName Module name e.g. (ep_etherpad-lite/static/js/plugins) * @params reqModuleName Module name e.g. (ep_etherpad-lite/static/js/plugins)
*/ */
exports.getRequirementFromParent = function(requireDefObj, reqModuleName) { exports.getRequirementFromParent = function(requireDefObj, reqModuleName) {
// Force the 'undefinition' of the modules (if they already have been loaded).
delete (requireDefObj._definitions)[reqModuleName];
delete (requireDefObj._modules)[reqModuleName];
requireDefObj.define(reqModuleName, function(require, exports, module) { requireDefObj.define(reqModuleName, function(require, exports, module) {
var t = parent; var t = parent;
var max = 0; // make sure I don't go up more than 10 times var max = 0; // make sure I don't go up more than 10 times