diff --git a/HISTORY.md b/HISTORY.md index 615f2c6b..a149870a 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -32,6 +32,7 @@ ### 2021-07-23 * byob, objects, gui, store: support custom categories in libraries * gui, byob: arrange custom categories alphabetically +* store: fixed exporting sprites ### 2021-07-22 * store: serialize user defined block palettes diff --git a/src/store.js b/src/store.js index 6b0339f0..b2071794 100644 --- a/src/store.js +++ b/src/store.js @@ -1816,7 +1816,7 @@ StageMorph.prototype.toXML = function (serializer) { }; SpriteMorph.prototype.toXML = function (serializer) { - var idx = serializer.root.sprites.asArray().indexOf(this) + 1, + var idx = serializer.scene.sprites.asArray().indexOf(this) + 1, costumeIdx = this.getCostumeIdx(), noCostumes = this.inheritsAttribute('costumes'), noSounds = this.inheritsAttribute('sounds'),