@manyducks.co/dolla 0.77.3 → 0.78.1
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 +6 -2
- package/lib/index.js.map +2 -2
- package/lib/nodes/cond.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -690,6 +690,7 @@ var Conditional = class {
|
|
|
690
690
|
connectedContent = [];
|
|
691
691
|
appContext;
|
|
692
692
|
elementContext;
|
|
693
|
+
initialUpdateHappened = false;
|
|
693
694
|
constructor(config) {
|
|
694
695
|
this.$predicate = config.$predicate;
|
|
695
696
|
this.thenContent = config.thenContent ? toMarkup(config.thenContent) : void 0;
|
|
@@ -713,8 +714,11 @@ var Conditional = class {
|
|
|
713
714
|
if (this.appContext.mode === "development") {
|
|
714
715
|
parent2.insertBefore(this.endNode, this.node.nextSibling);
|
|
715
716
|
}
|
|
716
|
-
this.stopCallback = observe(this.$predicate, (
|
|
717
|
-
this.
|
|
717
|
+
this.stopCallback = observe(this.$predicate, (current, previous) => {
|
|
718
|
+
if (!this.initialUpdateHappened || current && !previous || !current && previous) {
|
|
719
|
+
this.update(current);
|
|
720
|
+
this.initialUpdateHappened = true;
|
|
721
|
+
}
|
|
718
722
|
});
|
|
719
723
|
}
|
|
720
724
|
}
|