Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/scratch-vm/src/blocks/scratch3_looks.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class Scratch3LooksBlocks {
target.setCostume(optZeroIndex ? requestedCostume : requestedCostume - 1);
} else {
// Strings should be treated as costume names, where possible
const costumeIndex = target.getCostumeIndexByName(requestedCostume.toString());
const costumeIndex = target.getCostumeIndexByName(String(requestedCostume));

if (costumeIndex !== -1) {
target.setCostume(costumeIndex);
Expand Down Expand Up @@ -426,7 +426,7 @@ class Scratch3LooksBlocks {
stage.setCostume(optZeroIndex ? requestedBackdrop : requestedBackdrop - 1);
} else {
// Strings should be treated as backdrop names where possible
const costumeIndex = stage.getCostumeIndexByName(requestedBackdrop.toString());
const costumeIndex = stage.getCostumeIndexByName(String(requestedBackdrop));

if (costumeIndex !== -1) {
stage.setCostume(costumeIndex);
Expand Down
Loading