Fix indentation.

This commit is contained in:
Chad Weider 2012-05-28 15:43:39 -07:00
parent a8340dfbbe
commit 774e2a1517
1 changed files with 14 additions and 15 deletions

View File

@ -19,19 +19,18 @@
* @params reqModuleName Module name e.g. (ep_etherpad-lite/static/js/plugins)
*/
exports.getRequirementFromParent = function(requireDefObj, reqModuleName) {
requireDefObj.define(reqModuleName, function(require, exports, module) {
var t = parent;
var max = 0; // make sure I don't go up more than 10 times
while (typeof(t) != "undefined") {
max++;
if (max==10)
break;
if (typeof(t.require) != "undefined") {
module.exports = t.require(reqModuleName);
return;
}
t = t.parent;
}
});
requireDefObj.define(reqModuleName, function(require, exports, module) {
var t = parent;
var max = 0; // make sure I don't go up more than 10 times
while (typeof(t) != "undefined") {
max++;
if (max==10)
break;
if (typeof(t.require) != "undefined") {
module.exports = t.require(reqModuleName);
return;
}
t = t.parent;
}
});
}