mirror of https://github.com/status-im/metro.git
Make intentions clearer in code of require.js
Reviewed By: javache Differential Revision: D5479898 fbshipit-source-id: de73d5cffed4200b81f1d8335a3962a37702df63
This commit is contained in:
parent
1a75751a3b
commit
43457e6674
|
@ -91,7 +91,7 @@ function define(
|
|||
function require(moduleId: ModuleID | VerboseModuleNameForDev) {
|
||||
if (__DEV__ && typeof moduleId === 'string') {
|
||||
const verboseName = moduleId;
|
||||
moduleId = verboseNamesToModuleIds[moduleId];
|
||||
moduleId = verboseNamesToModuleIds[verboseName];
|
||||
if (moduleId == null) {
|
||||
throw new Error(`Unknown named module: '${verboseName}'`);
|
||||
} else {
|
||||
|
|
|
@ -44,7 +44,7 @@ function define(factory, moduleId, dependencyMap) {
|
|||
function _require(moduleId) {
|
||||
if (__DEV__ && typeof moduleId === 'string') {
|
||||
var _verboseName2 = moduleId;
|
||||
moduleId = verboseNamesToModuleIds[moduleId];
|
||||
moduleId = verboseNamesToModuleIds[_verboseName2];
|
||||
if (moduleId == null) {
|
||||
throw new Error('Unknown named module: \\\\'' + _verboseName2 + '\\\\'');
|
||||
} else {
|
||||
|
@ -311,7 +311,7 @@ function define(factory, moduleId, dependencyMap) {
|
|||
function _require(moduleId) {
|
||||
if (__DEV__ && typeof moduleId === 'string') {
|
||||
var _verboseName2 = moduleId;
|
||||
moduleId = verboseNamesToModuleIds[moduleId];
|
||||
moduleId = verboseNamesToModuleIds[_verboseName2];
|
||||
if (moduleId == null) {
|
||||
throw new Error('Unknown named module: \\\\'' + _verboseName2 + '\\\\'');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue