mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 17:54:48 +00:00
Fix module IDs of initial require calls
Summary: The logic of assigning module IDs to the initial require calls of a bundle was faulty, counting up from -1 instead of counting down. This change ensures that IDs are -1, -2, ... Reviewed By: matryoshcow Differential Revision: D3735560 fbshipit-source-id: 89efa3e73b39c2f8bfed8a6a30487733d1a8b145
This commit is contained in:
parent
ee49dd756d
commit
f83c869411
@ -67,7 +67,7 @@ class Bundle extends BundleBase {
|
||||
const name = 'require-' + moduleId;
|
||||
super.addModule(new ModuleTransport({
|
||||
name,
|
||||
id: this._numRequireCalls - 1,
|
||||
id: -this._numRequireCalls - 1,
|
||||
code,
|
||||
virtual: true,
|
||||
sourceCode: code,
|
||||
|
Loading…
x
Reference in New Issue
Block a user