mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Do not load extension if prefix is undefined
This commit is contained in:
parent
fd97892eb1
commit
192084e0e7
2 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue