@viewfly/core 1.1.7 → 1.1.9

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.
@@ -968,6 +968,9 @@ class Component extends ReflectiveInjector {
968
968
  (_c = this.unmountedCallbacks) === null || _c === void 0 ? void 0 : _c.forEach(fn => {
969
969
  fn();
970
970
  });
971
+ if (this.parentComponent instanceof Component) {
972
+ this.parentComponent.changedSubComponents.delete(this);
973
+ }
971
974
  this.parentComponent =
972
975
  this.parentInjector =
973
976
  this.propsChangedDestroyCallbacks =
@@ -1727,7 +1730,7 @@ function createSignal(state) {
1727
1730
  const subscribers = new Set();
1728
1731
  function signal() {
1729
1732
  const listener = getCurrentListener();
1730
- if (listener) {
1733
+ if (listener && !subscribers.has(listener)) {
1731
1734
  listener.destroyCallbacks.push(() => {
1732
1735
  subscribers.delete(listener);
1733
1736
  });
package/bundles/index.js CHANGED
@@ -970,6 +970,9 @@ class Component extends ReflectiveInjector {
970
970
  (_c = this.unmountedCallbacks) === null || _c === void 0 ? void 0 : _c.forEach(fn => {
971
971
  fn();
972
972
  });
973
+ if (this.parentComponent instanceof Component) {
974
+ this.parentComponent.changedSubComponents.delete(this);
975
+ }
973
976
  this.parentComponent =
974
977
  this.parentInjector =
975
978
  this.propsChangedDestroyCallbacks =
@@ -1729,7 +1732,7 @@ function createSignal(state) {
1729
1732
  const subscribers = new Set();
1730
1733
  function signal() {
1731
1734
  const listener = getCurrentListener();
1732
- if (listener) {
1735
+ if (listener && !subscribers.has(listener)) {
1733
1736
  listener.destroyCallbacks.push(() => {
1734
1737
  subscribers.delete(listener);
1735
1738
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewfly/core",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Viewfly is a simple and easy-to-use JavaScript framework with an intuitive development experience.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -50,7 +50,7 @@
50
50
  "bugs": {
51
51
  "url": "https://github.com/viewfly/viewfly.git/issues"
52
52
  },
53
- "gitHead": "d4a5c0ac00b6fb203d8d6c9970e3ef1093cd9782",
53
+ "gitHead": "eb5d5ce380467cb05637ef42fdb539c327b19feb",
54
54
  "dependencies": {
55
55
  "reflect-metadata": "^0.2.2"
56
56
  }