Skip to content

Commit

Permalink
fixed an error when referencing a renamed or nonexisting input slot i…
Browse files Browse the repository at this point in the history
…n a slot-menu-event hat block
  • Loading branch information
jmoenig committed Nov 14, 2024
1 parent 0a417fe commit 0a7b7b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script src="src/gui.js?version=2024-11-12"></script>
<script src="src/paint.js?version=2023-05-24"></script>
<script src="src/lists.js?version=2024-11-14"></script>
<script src="src/byob.js?version=2024-11-11"></script>
<script src="src/byob.js?version=2024-11-14"></script>
<script src="src/tables.js?version=2023-08-17"></script>
<script src="src/sketch.js?version=2023-05-24"></script>
<script src="src/video.js?version=2019-06-27"></script>
Expand Down
4 changes: 2 additions & 2 deletions src/byob.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ArgLabelMorph, embedMetadataPNG, ArgMorph, RingMorph, InputList*/

// Global stuff ////////////////////////////////////////////////////////

modules.byob = '2024-November-11';
modules.byob = '2024-November-14';

// Declarations

Expand Down Expand Up @@ -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'])
);
Expand Down

0 comments on commit 0a7b7b0

Please sign in to comment.