do not mess with global require
This commit is contained in:
parent
c36f8b7560
commit
e14b6072fa
1 changed files with 1 additions and 16 deletions
|
|
@ -42,24 +42,9 @@ var global = (function() {
|
|||
return this;
|
||||
})();
|
||||
|
||||
// take care of the case when requirejs is used and we just need to patch it a little bit
|
||||
if (!ACE_NAMESPACE && typeof requirejs !== "undefined") {
|
||||
|
||||
var define = global.define;
|
||||
global.define = function(id, deps, callback) {
|
||||
if (typeof callback !== "function")
|
||||
return define.apply(this, arguments);
|
||||
|
||||
return define(id, deps, function(require, exports, module) {
|
||||
if (deps[2] == "module")
|
||||
module.packaged = true;
|
||||
return callback.apply(this, arguments);
|
||||
});
|
||||
};
|
||||
global.define.packaged = true;
|
||||
|
||||
if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var _define = function(module, deps, payload) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue