diff --git a/js/controller/PreviewFilmController.js b/js/controller/PreviewFilmController.js index adbab71..c08068b 100644 --- a/js/controller/PreviewFilmController.js +++ b/js/controller/PreviewFilmController.js @@ -51,7 +51,10 @@ ns.PreviewFilmController.prototype.onDrop_ = function( event, ui ) { var frameId1 = parseInt($(event.srcElement).data("tile-number"), 10); var frameId2 = parseInt($(event.target).data("tile-number"), 10); - + + if(isNaN(frameId1) || isNaN(frameId2)) { + return; + } this.framesheet.swapFrames(frameId1, frameId2); // TODO(vincz): deprecate