From b99f089ae7f8cd9f4947eb302ab3473de19c6731 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 9 Nov 2016 11:22:17 -0500 Subject: [PATCH] Fix #327, "switch costume to [next/previous]" (#330) --- src/blocks/scratch3_looks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js index f37e9a8fd..60d95fd50 100644 --- a/src/blocks/scratch3_looks.js +++ b/src/blocks/scratch3_looks.js @@ -94,11 +94,11 @@ Scratch3LooksBlocks.prototype._setCostumeOrBackdrop = function (target, var costumeIndex = target.getCostumeIndexByName(requestedCostume); if (costumeIndex > -1) { target.setCostume(costumeIndex); - } else if (costumeIndex === 'previous costume' || - costumeIndex === 'previous backdrop') { + } else if (requestedCostume === 'previous costume' || + requestedCostume === 'previous backdrop') { target.setCostume(target.currentCostume - 1); - } else if (costumeIndex === 'next costume' || - costumeIndex === 'next backdrop') { + } else if (requestedCostume === 'next costume' || + requestedCostume === 'next backdrop') { target.setCostume(target.currentCostume + 1); } else { var forcedNumber = Cast.toNumber(requestedCostume);