From 1fd11fb54701ab6211f70ecbe1d9f98307de262f Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 1 Sep 2013 23:28:55 +0200 Subject: [PATCH] Don't show delete dialog for category if it doesn't exist yet. fix #1961 --- couchpotato/core/plugins/category/static/category.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/couchpotato/core/plugins/category/static/category.js b/couchpotato/core/plugins/category/static/category.js index 29a5a458..168b70de 100644 --- a/couchpotato/core/plugins/category/static/category.js +++ b/couchpotato/core/plugins/category/static/category.js @@ -271,6 +271,11 @@ var Category = new Class({ del: function(){ var self = this; + + if(self.data.label == undefined){ + self.el.destroy(); + return; + } var label = self.el.getElement('.category_label input').get('value'); var qObj = new Question('Are you sure you want to delete "'+label+'"?', '', [{