@viewfly/core 1.1.6 → 1.1.8

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,12 +968,15 @@ class Component extends ReflectiveInjector {
968
968
  (_c = this.unmountedCallbacks) === null || _c === void 0 ? void 0 : _c.forEach(fn => {
969
969
  fn();
970
970
  });
971
- this.propsChangedDestroyCallbacks =
972
- this.updatedDestroyCallbacks =
973
- this.mountCallbacks =
974
- this.updatedCallbacks =
975
- this.propsChangedCallbacks =
976
- this.unmountedCallbacks = null;
971
+ this.parentComponent =
972
+ this.parentInjector =
973
+ this.propsChangedDestroyCallbacks =
974
+ this.updatedDestroyCallbacks =
975
+ this.mountCallbacks =
976
+ this.updatedCallbacks =
977
+ this.propsChangedCallbacks =
978
+ this.unmountedCallbacks = null;
979
+ this.changedSubComponents.clear();
977
980
  }
978
981
  rendered() {
979
982
  this.changedSubComponents.clear();
@@ -1724,7 +1727,7 @@ function createSignal(state) {
1724
1727
  const subscribers = new Set();
1725
1728
  function signal() {
1726
1729
  const listener = getCurrentListener();
1727
- if (listener) {
1730
+ if (listener && !subscribers.has(listener)) {
1728
1731
  listener.destroyCallbacks.push(() => {
1729
1732
  subscribers.delete(listener);
1730
1733
  });
package/bundles/index.js CHANGED
@@ -970,12 +970,15 @@ class Component extends ReflectiveInjector {
970
970
  (_c = this.unmountedCallbacks) === null || _c === void 0 ? void 0 : _c.forEach(fn => {
971
971
  fn();
972
972
  });
973
- this.propsChangedDestroyCallbacks =
974
- this.updatedDestroyCallbacks =
975
- this.mountCallbacks =
976
- this.updatedCallbacks =
977
- this.propsChangedCallbacks =
978
- this.unmountedCallbacks = null;
973
+ this.parentComponent =
974
+ this.parentInjector =
975
+ this.propsChangedDestroyCallbacks =
976
+ this.updatedDestroyCallbacks =
977
+ this.mountCallbacks =
978
+ this.updatedCallbacks =
979
+ this.propsChangedCallbacks =
980
+ this.unmountedCallbacks = null;
981
+ this.changedSubComponents.clear();
979
982
  }
980
983
  rendered() {
981
984
  this.changedSubComponents.clear();
@@ -1726,7 +1729,7 @@ function createSignal(state) {
1726
1729
  const subscribers = new Set();
1727
1730
  function signal() {
1728
1731
  const listener = getCurrentListener();
1729
- if (listener) {
1732
+ if (listener && !subscribers.has(listener)) {
1730
1733
  listener.destroyCallbacks.push(() => {
1731
1734
  subscribers.delete(listener);
1732
1735
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewfly/core",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
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": "381f112dffa12664d95ddc2c27603990c8f5c3ab",
53
+ "gitHead": "ce052adff82ca986e0434a0935a1cd14a7e1cb55",
54
54
  "dependencies": {
55
55
  "reflect-metadata": "^0.2.2"
56
56
  }