diff --git a/src/serialization/sb2.js b/src/serialization/sb2.js index 9063bcf2d..4c7c31862 100644 --- a/src/serialization/sb2.js +++ b/src/serialization/sb2.js @@ -521,7 +521,7 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension const index = blockMetadata.opcode.indexOf('_'); const prefix = blockMetadata.opcode.substring(0, index); if (CORE_EXTENSIONS.indexOf(prefix) === -1) { - extensions.extensionIDs.add(prefix); + if (prefix !== '') extensions.extensionIDs.add(prefix); } // Block skeleton. diff --git a/src/serialization/sb3.js b/src/serialization/sb3.js index d7be7a98f..0bcaf1f30 100644 --- a/src/serialization/sb3.js +++ b/src/serialization/sb3.js @@ -720,7 +720,7 @@ const parseScratchObject = function (object, runtime, extensions, zip) { const index = blockJSON.opcode.indexOf('_'); const prefix = blockJSON.opcode.substring(0, index); if (CORE_EXTENSIONS.indexOf(prefix) === -1) { - extensions.extensionIDs.add(prefix); + if (prefix !== '') extensions.extensionIDs.add(prefix); } } }