Switch to using number directly, instead of toNumber for costume switch (#499)

This commit is contained in:
Silly Inventor 2017-03-23 18:34:04 -04:00 committed by Ray Schamp
parent 144c587e78
commit 77775cdadb

View file

@ -101,7 +101,7 @@ Scratch3LooksBlocks.prototype._setCostumeOrBackdrop = function (target,
requestedCostume === 'next backdrop') {
target.setCostume(target.currentCostume + 1);
} else {
var forcedNumber = Cast.toNumber(requestedCostume);
var forcedNumber = Number(requestedCostume);
if (!isNaN(forcedNumber)) {
target.setCostume(optZeroIndex ?
forcedNumber : forcedNumber - 1);