Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Aug 31, 2023
1 parent 679b01a commit 9ff2891
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions ember_debug/utils/ember/loader.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import Ember from '../ember';

let module;

try {
module = Ember.__loader;
} catch {
module = {
require,
requireModule,
};
}
const require = function (id) {
try {
return Ember.__loader.require(id);
} catch (e) {
return requireModule(id);
}
};

export function emberSafeRequire(id) {
try {
return module.require(id);
return require(id);
} catch (e) {
return undefined;
}
}

export let EmberLoader = module;
export let EmberLoader = {
require,
requireModule: require,
};

0 comments on commit 9ff2891

Please sign in to comment.