From bcf1c397820ba5b8917cd4be11060991ee26c86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Tue, 7 Feb 2017 06:15:08 -0800 Subject: [PATCH] catch block label part issues, prevent palette from not showing --- blocks.js | 6 +++++- history.txt | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/blocks.js b/blocks.js index 06862baf..5d24a47e 100644 --- a/blocks.js +++ b/blocks.js @@ -150,7 +150,7 @@ CustomCommandBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2017-February-02'; +modules.blocks = '2017-February-07'; var SyntaxElementMorph; var BlockMorph; @@ -2276,6 +2276,10 @@ BlockMorph.prototype.setSpec = function (spec, silently) { inputIdx += 1; } part = myself.labelPart(word); + if (isNil(part)) { + // console.log('could not create label part', word); + return; + } myself.add(part); if (!(part instanceof CommandSlotMorph || part instanceof StringMorph)) { diff --git a/history.txt b/history.txt index e2267ef7..ff93df94 100755 --- a/history.txt +++ b/history.txt @@ -3354,3 +3354,7 @@ Fixes: ------ * Objects, BYOB: highly experimental custom block inheritance, under construction… * Blocks: fixed #1650 + +170207 +------ +* Blocks: catch block label part issues, prevent palette from not showing