Merge pull request #2162 from pearcetm/imagetilesource-bugfix

Bugfix for imagetilesource _freeupCanvasMemory
This commit is contained in:
Ian Gilman 2022-05-18 15:33:47 -07:00 committed by GitHub
commit 15ef58a8f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,9 +272,11 @@
*/ */
_freeupCanvasMemory: function () { _freeupCanvasMemory: function () {
for (var i = 0; i < this.levels.length; i++) { for (var i = 0; i < this.levels.length; i++) {
if(this.levels[i].context2D){
this.levels[i].context2D.canvas.height = 0; this.levels[i].context2D.canvas.height = 0;
this.levels[i].context2D.canvas.width = 0; this.levels[i].context2D.canvas.width = 0;
} }
}
}, },
}); });