@b9g/crank 0.5.4 → 0.5.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b9g/crank",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Write JSX-driven components with functions, promises and generators.",
5
5
  "homepage": "https://crank.js.org",
6
6
  "bugs": {
package/umd.js CHANGED
@@ -548,7 +548,7 @@
548
548
  // cleanup remaining retainers
549
549
  for (; oi < oldLength; oi++) {
550
550
  const ret = oldRetained[oi];
551
- if (typeof ret === "object" && typeof ret.el.key === "undefined") {
551
+ if (typeof ret === "object") {
552
552
  (graveyard = graveyard || []).push(ret);
553
553
  }
554
554
  }
@@ -1770,6 +1770,9 @@
1770
1770
  }
1771
1771
  // TODO: async unmounting
1772
1772
  function unmountComponent(ctx) {
1773
+ if (ctx.f & IsUnmounted) {
1774
+ return;
1775
+ }
1773
1776
  clearEventListeners(ctx);
1774
1777
  const callbacks = cleanupMap.get(ctx);
1775
1778
  if (callbacks) {