fixed issue where disabled categories showed up in the category dropdown in /unread
This commit is contained in:
Julian Lam
2015-07-23 12:47:58 -04:00
parent 12601dd3aa
commit 0bc175dd4c
2 changed files with 3 additions and 3 deletions

View File

@@ -156,7 +156,7 @@ var async = require('async'),
}
category.name = validator.escape(category.name);
category.disabled = parseInt(category.disabled, 10) === 1;
category.disabled = category.hasOwnProperty('disabled') ? parseInt(category.disabled, 10) === 1 : undefined;
category.icon = category.icon || 'hidden';
if (category.hasOwnProperty('post_count')) {
category.post_count = category.totalPostCount = category.post_count || 0;