Comparing version 0.19.2 to 0.19.3
{ | ||
"name": "cerebral", | ||
"version": "0.19.2", | ||
"version": "0.19.3", | ||
"description": "A state controller with its own debugger", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -29,2 +29,3 @@ /* | ||
var currentIndex = signals.length - 1; | ||
var hasRememberedInitial = false; | ||
@@ -57,2 +58,3 @@ return { | ||
// keep the latest one | ||
/* ALWAYS KEEP STATE | ||
if (!willKeepState) { | ||
@@ -62,2 +64,3 @@ signals = []; | ||
} | ||
*/ | ||
@@ -101,2 +104,12 @@ // If we have travelled back and start adding new signals the signals not triggered should | ||
rememberInitial: function (index) { | ||
// Both router and debugger might try to do initial remembering | ||
if (hasRememberedInitial) { | ||
return; | ||
} | ||
hasRememberedInitial = true; | ||
this.remember(index); | ||
}, | ||
remember: function(index) { | ||
@@ -103,0 +116,0 @@ |
@@ -36,3 +36,3 @@ var utils = require('./utils.js'); | ||
} else { | ||
signalStore.remember(signalStore.getSignals().length - 1); | ||
signalStore.rememberInitial(signalStore.getSignals().length - 1); | ||
window.dispatchEvent(event); | ||
@@ -39,0 +39,0 @@ } |
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
2384239
29293