zimjs 16.2.1 → 16.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/zim.js +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zimjs",
3
- "version": "16.2.1",
3
+ "version": "16.2.2",
4
4
  "type": "module",
5
5
  "main": "./src/zim.js",
6
6
  "types": "./ts-src/typings/zim",
package/src/zim.js CHANGED
@@ -82833,23 +82833,23 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
82833
82833
  WW.removeEventListener("mouseup", leftEvent);
82834
82834
 
82835
82835
  if (!allowDefault) document.body.style.overflow = "auto";
82836
+ zim.Ticker.dispose(stage);
82836
82837
  recursiveDispose(stage);
82838
+ if (that == zim.tickerFrame) zim.tickerFrame = null;
82837
82839
  function recursiveDispose(obj) {
82838
- if (obj.dispose) obj.dispose();
82840
+ if (obj && obj.dispose) obj.dispose();
82839
82841
  else {
82840
- obj.removeAllEventListeners();
82841
- if (obj.numChildren) {
82842
+ if (obj) obj.removeAllEventListeners();
82843
+ if (obj && obj.numChildren) {
82842
82844
  for (var i=obj.numChildren-1; i>=0; i--) {
82843
82845
  recursiveDispose(obj.getChildAt(i));
82844
82846
  }
82845
82847
  }
82846
- if (obj.parent) obj.parent.removeChild(obj);
82848
+ if (obj && obj.parent) obj.parent.removeChild(obj);
82847
82849
  }
82848
82850
  obj = null;
82849
82851
  }
82850
- if (zid(canvasID)) zid(canvasID).parentNode.removeChild(zid(canvasID));
82851
- zim.Ticker.dispose(stage);
82852
- if (that == zim.tickerFrame) zim.tickerFrame = null;
82852
+ if (zid(canvasID)) zid(canvasID).parentNode.removeChild(zid(canvasID));
82853
82853
  if (that === WW.zdf) WW.zdf = WW.S = WW.W = WW.H = null;
82854
82854
 
82855
82855
  stage = null;