mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-20 18:29:57 -04:00
Split extended opcode with splitFirst instead of split
This commit is contained in:
parent
8602d5798a
commit
346e1383ed
1 changed files with 1 additions and 1 deletions
|
@ -1837,7 +1837,7 @@ class Runtime extends EventEmitter {
|
|||
* @property {string} [label] - the label for this opcode if `labelFn` is absent
|
||||
*/
|
||||
getLabelForOpcode (extendedOpcode) {
|
||||
const [category, opcode] = extendedOpcode.split('_');
|
||||
const [category, opcode] = StringUtil.splitFirst(extendedOpcode, '_');
|
||||
if (!(category && opcode)) return;
|
||||
|
||||
const categoryInfo = this._blockInfo.find(ci => ci.id === category);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue