File tree Expand file tree Collapse file tree
packages/scratch-vm/src/blocks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ class Scratch3LooksBlocks {
392392 target . setCostume ( optZeroIndex ? requestedCostume : requestedCostume - 1 ) ;
393393 } else {
394394 // Strings should be treated as costume names, where possible
395- const costumeIndex = target . getCostumeIndexByName ( requestedCostume . toString ( ) ) ;
395+ const costumeIndex = target . getCostumeIndexByName ( String ( requestedCostume ) ) ;
396396
397397 if ( costumeIndex !== - 1 ) {
398398 target . setCostume ( costumeIndex ) ;
@@ -426,7 +426,7 @@ class Scratch3LooksBlocks {
426426 stage . setCostume ( optZeroIndex ? requestedBackdrop : requestedBackdrop - 1 ) ;
427427 } else {
428428 // Strings should be treated as backdrop names where possible
429- const costumeIndex = stage . getCostumeIndexByName ( requestedBackdrop . toString ( ) ) ;
429+ const costumeIndex = stage . getCostumeIndexByName ( String ( requestedBackdrop ) ) ;
430430
431431 if ( costumeIndex !== - 1 ) {
432432 stage . setCostume ( costumeIndex ) ;
You can’t perform that action at this time.
0 commit comments