From a27ea76d25bd1b09b92cfc261ed3bb6f83d477a7 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford Date: Mon, 22 Apr 2019 17:47:31 -0700 Subject: [PATCH] add "scratch_extension" only if a block has an icon --- src/engine/runtime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/runtime.js b/src/engine/runtime.js index a7f97d85..8b066b0a 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -1003,8 +1003,7 @@ class Runtime extends EventEmitter { category: categoryInfo.name, colour: categoryInfo.color1, colourSecondary: categoryInfo.color2, - colourTertiary: categoryInfo.color3, - extensions: ['scratch_extension'] + colourTertiary: categoryInfo.color3 }; const context = { // TODO: store this somewhere so that we can map args appropriately after translation. @@ -1024,6 +1023,7 @@ class Runtime extends EventEmitter { const iconURI = blockInfo.blockIconURI || categoryInfo.blockIconURI; if (iconURI) { + blockJSON.extensions = ['scratch_extension']; blockJSON.message0 = '%1 %2'; const iconJSON = { type: 'field_image',