From: Mark Wooding Date: Sat, 30 Jun 2018 21:49:23 +0000 (+0100) Subject: dep.js (value): Force the dep before registering a dependents. X-Git-Url: https://git.distorted.org.uk/~mdw/dep-ui/commitdiff_plain/f2059c0fd232dfec5064d6df1cf787cce50fbcb2 dep.js (value): Force the dep before registering a dependents. Otherwise we'll add the dependent to the list, and then `_propagate' will clear the list, forgetting about us. --- diff --git a/dep.js b/dep.js index d21f94a..ec09e83 100644 --- a/dep.js +++ b/dep.js @@ -395,11 +395,11 @@ Dep.prototype = { var val; if (STATE === 'recomputing') { + this._force(); if (EVALUATING) { this._dependents[EVALUATING._seq] = EVALUATING; EVALUATING._dependencies[this._seq] = this; } - this._force(); } val = this._value; if (val === BAD) throw BAD;