message: Refactor addIgnoredModule function
diff: @@ -107,6 +107,11 @@ export class NativeClient {
  if (this._ignoredModules[moduleID]) {
  continue;
  }
  + this._addIgnoredModule(moduleID, moduleName);
  + }
  + }
  +
  + _addIgnoredModule(moduleID, moduleName) {
  if (
  this.options.ignoreModulesExclude.indexOf(moduleName) === -1 &&
  (DEFAULT_MODULE_IGNORES.indexOf(moduleName) >= 0 ||
  @@ -115,7 +120,6 @@ export class NativeClient {
  this._ignoredModules[moduleID] = true;
  }
  }
  - }
  _activateStacktraceMerging = async () => {
  return RNSentry.activateStacktraceMerging()
  @@ -128,26 +132,15 @@ export class NativeClient {
  if (typeof __fbBatchedBridgeConfig !== 'undefined') {
  /* global __fbBatchedBridgeConfig */
  __fbBatchedBridgeConfig.remoteModuleConfig.forEach((module, moduleID) => {
  - if (
  - module !== null &&
  - this.options.ignoreModulesExclude.indexOf(module[0]) === -1 &&
  - (DEFAULT_MODULE_IGNORES.indexOf(module[0]) >= 0 ||
  - this.options.ignoreModulesInclude.indexOf(module[0]) >= 0)
  - ) {
  - this._ignoredModules[moduleID] = true;
  + if (module !== null) {
  + this._addIgnoredModule(moduleID, module[0]);
  }
  });
  } else if (BatchedBridge._remoteModuleTable) {
  - for (let module in BatchedBridge._remoteModuleTable) {
  - if (BatchedBridge._remoteModuleTable.hasOwnProperty(module)) {
  - let moduleName = BatchedBridge._remoteModuleTable[module];
  - if (
  - this.options.ignoreModulesExclude.indexOf(moduleName) === -1 &&
  - (DEFAULT_MODULE_IGNORES.indexOf(moduleName) >= 0 ||
  - this.options.ignoreModulesInclude.indexOf(moduleName) >= 0)
  - ) {
  - this._ignoredModules[module] = true;
  - }
  + for (let moduleID in BatchedBridge._remoteModuleTable) {
  + if (BatchedBridge._remoteModuleTable.hasOwnProperty(moduleID)) {
  + let moduleName = BatchedBridge._remoteModuleTable[moduleID];
  + this._addIgnoredModule(moduleID, moduleName);
  }
  }
  }
  