From 83adb56bd0989482d985041449cd70c547398341 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 15 Feb 2019 17:26:11 +0100 Subject: [PATCH] tweaked yesterday's fix... --- HISTORY.md | 5 ++++- snap.html | 2 +- src/byob.js | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 711bae69..b7d75e23 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -39,7 +39,10 @@ * Greek, thanks, Alexandros! * German -### 2019-02-07 +### 2019-02-15 +* BYOB: tweaked yesterday's fix... + +### 2019-02-14 * BYOB: keep empty numerical input slots in custom blocks empty when relabelling ### 2019-02-07 diff --git a/snap.html b/snap.html index 415e01ac..daf5fc20 100755 --- a/snap.html +++ b/snap.html @@ -12,7 +12,7 @@ - + diff --git a/src/byob.js b/src/byob.js index d18872a9..9e57fb5b 100644 --- a/src/byob.js +++ b/src/byob.js @@ -108,7 +108,7 @@ BooleanSlotMorph, XML_Serializer, SnapTranslator*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2019-February-14'; +modules.byob = '2019-February-15'; // Declarations @@ -678,7 +678,9 @@ CustomCommandBlockMorph.prototype.restoreInputs = function (oldInputs) { myself.silentReplaceInput(inp, old.fullCopy()); } else if (old instanceof InputSlotMorph && inp instanceof InputSlotMorph) { - if (!old.isEmptySlot()) { + if (old.isEmptySlot()) { + inp.setContents(''); + } else { inp.setContents(old.evaluate()); } } else if (old instanceof BooleanSlotMorph