FIX: Alias modules that are required AND imported (#8315)

This commit is contained in:
Mark VanLandingham 2019-11-08 09:48:02 -06:00 committed by GitHub
parent 1998be3b27
commit 47e3e56905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -151,7 +151,7 @@ var define, requirejs;
}
Module.prototype.makeRequire = function() {
var name = this.name;
var name = transformForAliases(this.name);
return (
this._require ||
@ -217,7 +217,7 @@ var define, requirejs;
}
function requireFrom(name, origin) {
name = checkForAlias(name);
name = transformForAliases(name);
var mod = EMBER_MODULES[name] || registry[name];
if (!mod) {
throw new Error(
@ -231,7 +231,7 @@ var define, requirejs;
throw new Error("Could not find module " + name);
}
function checkForAlias(name) {
function transformForAliases(name) {
return ALIASES[name] ? ALIASES[name] : name;
}