Skip to content

Commit

Permalink
Merge pull request #1515 from quanganhtran/invariant-fix
Browse files Browse the repository at this point in the history
Fix invariant check for ComputedValue constructor
  • Loading branch information
mweststrate committed Apr 26, 2018
2 parents 91c2ea4 + 8844da2 commit 10fca42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/computedvalue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class ComputedValue<T> implements IObservable, IComputedValue<T>, IDeriva
* This is useful for working with vectors, mouse coordinates etc.
*/
constructor(options: IComputedValueOptions<T>) {
if (process.env.NODE_ENV === "production" && !options.get)
if (process.env.NODE_ENV !== "production" && !options.get)
return fail("missing option for computed: get")
this.derivation = options.get!
this.name = options.name || "ComputedValue@" + getNextId()
Expand Down

0 comments on commit 10fca42

Please sign in to comment.