diff --git a/octoprint/static/js/ui.js b/octoprint/static/js/ui.js index 1af7887..36e44cf 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -669,8 +669,7 @@ function GcodeFilesViewModel() { }) } - self.removeFile = function() { - var filename = this.name; + self.removeFile = function(filename) { $.ajax({ url: AJAX_BASEURL + "gcodefiles/delete", type: "POST",