@maverick-js/signals
Advanced tools
Comparing version 5.1.6 to 5.1.7
@@ -100,3 +100,3 @@ // src/scheduler.ts | ||
appendScope($root); | ||
return compute($root, () => init(() => dispose($root, true))); | ||
return compute($root, () => init(() => dispose($root, true)), null); | ||
} | ||
@@ -186,3 +186,3 @@ function peek(compute2) { | ||
try { | ||
compute(scope, run); | ||
compute(scope, run, null); | ||
} catch (error) { | ||
@@ -260,7 +260,8 @@ handleError(scope, error); | ||
} | ||
function compute(scope, compute2) { | ||
let prevScope = currentScope; | ||
function compute(scope, compute2, observer) { | ||
const prevScope = currentScope, prevObserver = currentObserver; | ||
if (currentObserver) | ||
computeStack.push(currentObserver); | ||
currentScope = scope; | ||
currentObserver = observer; | ||
try { | ||
@@ -272,2 +273,3 @@ return compute2(); | ||
currentScope = prevScope; | ||
currentObserver = prevObserver; | ||
} | ||
@@ -376,4 +378,3 @@ } | ||
if (this._compute && isDirty(this)) { | ||
let prevObserver = currentObserver, prevObservers = currentObservers, prevObserversIndex = currentObserversIndex; | ||
currentObserver = this; | ||
let prevObservers = currentObservers, prevObserversIndex = currentObserversIndex; | ||
currentObservers = null; | ||
@@ -391,3 +392,3 @@ currentObserversIndex = 0; | ||
} | ||
const result = compute(scoped2 ? this : currentScope, this._compute); | ||
const result = compute(scoped2 ? this : currentScope, this._compute, this); | ||
if (currentObservers) { | ||
@@ -437,3 +438,2 @@ if (this._sources) | ||
} | ||
currentObserver = prevObserver; | ||
currentObservers = prevObservers; | ||
@@ -440,0 +440,0 @@ currentObserversIndex = prevObserversIndex; |
@@ -98,3 +98,3 @@ // src/scheduler.ts | ||
appendScope($root); | ||
return compute($root, () => init(() => dispose($root, true))); | ||
return compute($root, () => init(() => dispose($root, true)), null); | ||
} | ||
@@ -184,3 +184,3 @@ function peek(compute2) { | ||
try { | ||
compute(scope, run); | ||
compute(scope, run, null); | ||
} catch (error) { | ||
@@ -258,7 +258,8 @@ handleError(scope, error); | ||
} | ||
function compute(scope, compute2) { | ||
let prevScope = currentScope; | ||
function compute(scope, compute2, observer) { | ||
const prevScope = currentScope, prevObserver = currentObserver; | ||
if (false) | ||
computeStack.push(currentObserver); | ||
currentScope = scope; | ||
currentObserver = observer; | ||
try { | ||
@@ -270,2 +271,3 @@ return compute2(); | ||
currentScope = prevScope; | ||
currentObserver = prevObserver; | ||
} | ||
@@ -374,4 +376,3 @@ } | ||
if (this.h && isDirty(this)) { | ||
let prevObserver = currentObserver, prevObservers = currentObservers, prevObserversIndex = currentObserversIndex; | ||
currentObserver = this; | ||
let prevObservers = currentObservers, prevObserversIndex = currentObserversIndex; | ||
currentObservers = null; | ||
@@ -389,3 +390,3 @@ currentObserversIndex = 0; | ||
} | ||
const result = compute(scoped2 ? this : currentScope, this.h); | ||
const result = compute(scoped2 ? this : currentScope, this.h, this); | ||
if (currentObservers) { | ||
@@ -435,3 +436,2 @@ if (this.a) | ||
} | ||
currentObserver = prevObserver; | ||
currentObservers = prevObservers; | ||
@@ -438,0 +438,0 @@ currentObserversIndex = prevObserversIndex; |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "5.1.6", | ||
"version": "5.1.7", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "module": "dist/prod/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66295