diff --git a/HISTORY.md b/HISTORY.md index 57c40c410..9f7439acd 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,11 @@ # Snap! (BYOB) History ## in development: +* **Notable Fixes:** + * fixed querying the pixels of an empty costume + +### 2024-08-20 +* objects: fixed querying the pixels of an empty costume ## 10.0.4: * **Notable Changes:** diff --git a/snap.html b/snap.html index 4ff841a83..e3aeef914 100755 --- a/snap.html +++ b/snap.html @@ -18,7 +18,7 @@ - + diff --git a/src/objects.js b/src/objects.js index 1645192de..df6c3b80e 100644 --- a/src/objects.js +++ b/src/objects.js @@ -96,7 +96,7 @@ CustomBlockDefinition, exportEmbroidery*/ /*jshint esversion: 11*/ -modules.objects = '2024-August-07'; +modules.objects = '2024-August-20'; var SpriteMorph; var StageMorph; @@ -13142,7 +13142,7 @@ Costume.prototype.pixels = function () { i; if (!this.contents.width || !this.contents.height) { - return pixels; + return new List(pixels); } src = this.contents.getContext('2d').getImageData( 0,