mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix support for haste packages
Summary: Fixes support for haste packages in `ModuleGraph`. As `HasteMap` is no longer used for anything else, we can probably strip it down completely. Reviewed By: cpojer Differential Revision: D4967367 fbshipit-source-id: d40cbe46c1e8b05690c0a2c71955479c28607c01
This commit is contained in:
committed by
Facebook Github Bot
parent
8fe24da6c2
commit
a26e042784
@@ -51,8 +51,8 @@ function getFakeModuleMap(hasteMap: HasteMap) {
|
||||
return module && module.type === 'Module' ? module.path : null;
|
||||
},
|
||||
getPackage(name: string, platform: ?string): ?string {
|
||||
const module = hasteMap.getModule(name, platform);
|
||||
return module && module.type === 'Package' ? module.path : null;
|
||||
const pkg = hasteMap.getPackage(name);
|
||||
return pkg && pkg.path;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user