@manyducks.co/dolla 0.78.1 → 0.78.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -691,6 +691,7 @@ var Conditional = class {
691
691
  appContext;
692
692
  elementContext;
693
693
  initialUpdateHappened = false;
694
+ previousValue;
694
695
  constructor(config) {
695
696
  this.$predicate = config.$predicate;
696
697
  this.thenContent = config.thenContent ? toMarkup(config.thenContent) : void 0;
@@ -714,10 +715,11 @@ var Conditional = class {
714
715
  if (this.appContext.mode === "development") {
715
716
  parent2.insertBefore(this.endNode, this.node.nextSibling);
716
717
  }
717
- this.stopCallback = observe(this.$predicate, (current, previous) => {
718
- if (!this.initialUpdateHappened || current && !previous || !current && previous) {
719
- this.update(current);
718
+ this.stopCallback = observe(this.$predicate, (value) => {
719
+ if (!this.initialUpdateHappened || value && !this.previousValue || !value && this.previousValue) {
720
+ this.update(value);
720
721
  this.initialUpdateHappened = true;
722
+ this.previousValue = value;
721
723
  }
722
724
  });
723
725
  }