From 0a7b7b0f42e4168881eff32c3369aefb0dec8d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Thu, 14 Nov 2024 11:27:39 +0100 Subject: [PATCH] fixed an error when referencing a renamed or nonexisting input slot in a slot-menu-event hat block --- HISTORY.md | 4 +++- snap.html | 2 +- src/byob.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index d77b33dff..b89eea7e4 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,9 +3,11 @@ ## in development: * **Notable Fixes:** * fixed "reshape" to let a zero dimension consistenly refer to the available leaf count, e.g. reshape (['foo', 'bar'], 0) => ['foo', 'bar'] + * fixed an error when referencing a renamed or nonexisting input slot in a slot-menu-event hat block ### 2024-11-14 -* lists: fixed "reshape" to let a zero dimension consistenly refer to the available leaf count, e.g. reshape (['foo', 'bar'], 0) => ['foo', 'bar'] +* lists: fixed "reshape" to let a zero dimension consistenly refer to the available leaf count, e.g. reshape (['foo', 'bar'], 0) => ['foo', 'bar'] +* byob: fixed an error when referencing a renamed or nonexisting input slot in a slot-menu-event hat block ## 10.2.4: * **Notable Fixes:** diff --git a/snap.html b/snap.html index 698278f43..c42c49389 100755 --- a/snap.html +++ b/snap.html @@ -23,7 +23,7 @@ - + diff --git a/src/byob.js b/src/byob.js index 8bb7b250c..730a56432 100644 --- a/src/byob.js +++ b/src/byob.js @@ -111,7 +111,7 @@ ArgLabelMorph, embedMetadataPNG, ArgMorph, RingMorph, InputList*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2024-November-11'; +modules.byob = '2024-November-14'; // Declarations @@ -3476,7 +3476,7 @@ BlockEditorMorph.prototype.updateDefinition = function () { menuHats.forEach(hat => { let slot = hat.inputs()[0].evaluate(), info = this.definition.declarations.get(slot); - if (slot !== '' && !info[2]) { + if (slot !== '' && info && !info[2]) { info[2] = this.definition.encodeChoices( new List(['ยง_dynamicMenu']) );