From 4a679de64702c34b985b472ffd86493aa2454a58 Mon Sep 17 00:00:00 2001 From: Gaetano Bonofiglio Date: Sun, 14 Jan 2018 21:14:38 +0100 Subject: [PATCH] fixed error with file removal from other image --- js/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/controller.js b/js/controller.js index 81e61d5..526681f 100644 --- a/js/controller.js +++ b/js/controller.js @@ -67,8 +67,8 @@ app.controller('nc', function($scope) { machine.other.files.push({"name":"", "contents":""}); }; - $scope.removeGateway = function(machine) { - if(machine.other.fileCounter>1 && confirm("Are you sure you want to remove the file?")) { + $scope.removeFile = function(machine) { + if(machine.other.fileCounter>0 && confirm("Are you sure you want to remove the file?")) { machine.other.files.pop(); machine.other.fileCounter--; }