Skip to content

Commit 7e876cc

Browse files
Merge pull request #1 from yuri-kiss/patch-1
fix: use Cast.toString
2 parents 1ce0176 + b22129c commit 7e876cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/scratch-vm/src/blocks/scratch3_looks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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(String(requestedCostume));
395+
const costumeIndex = target.getCostumeIndexByName(Cast.toString(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(String(requestedBackdrop));
429+
const costumeIndex = stage.getCostumeIndexByName(Cast.toString(requestedBackdrop));
430430

431431
if (costumeIndex !== -1) {
432432
stage.setCostume(costumeIndex);

0 commit comments

Comments
 (0)