diff --git a/js/piskel.js b/js/piskel.js index 19baa0be..69475438 100644 --- a/js/piskel.js +++ b/js/piskel.js @@ -183,7 +183,8 @@ $.namespace("pskl"); removeFrame: function(frameIndex) { frameSheet.removeFrameByIndex(frameIndex); - this.setActiveFrameAndRedraw(frameIndex - 1); + var activeFrameIndex = frameIndex ? frameIndex - 1 : 0; + this.setActiveFrameAndRedraw(activeFrameIndex); }, duplicateFrame: function(frameIndex) {