Fix reactFailOnUnsupportedSideEffects (#2532)

Summary:
Release notes: none

Fixes a bug where `reactFailOnUnsupportedSideEffects` should evaluate to `false` if passed as false. Also fixes a lint issue on `master`.
Pull Request resolved: https://github.com/facebook/prepack/pull/2532

Differential Revision: D9662462

Pulled By: trueadm

fbshipit-source-id: 1ffeea55e55a2bde9f1d44c64ac85d7e1b1727cf
This commit is contained in:
Dominic Gannaway 2018-09-05 13:48:39 -07:00 committed by Facebook Github Bot
parent 553d926009
commit 4f0bce54c9
2 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ export class Reconciler {
if (this.realm.react.failOnUnsupportedSideEffects) {
handleReportedSideEffect(throwUnsupportedSideEffectError, sideEffectType, binding, expressionLocation);
}
},
}
)
);
} finally {

View File

@ -299,7 +299,7 @@ export class Realm {
emptyArray: undefined,
emptyObject: undefined,
enabled: opts.reactEnabled || false,
failOnUnsupportedSideEffects: opts.reactFailOnUnsupportedSideEffects || true,
failOnUnsupportedSideEffects: opts.reactFailOnUnsupportedSideEffects === false ? false : true,
hoistableFunctions: new WeakMap(),
hoistableReactElements: new WeakMap(),
noopFunction: undefined,