Skip to content

Node.js based forum software built for the modern web

save

Сергей Савельевe529d18414e3
diff --cc src/categories/create.js
index 62f9d28266,ce293d1c42..57fb2875b9
--- a/src/categories/create.js
+++ b/src/categories/create.js
@@@ -19,12 -20,12 +20,12 @@@ module.exports = function(Categories)
var category = {
cid: cid,
name: data.name,
- description: data.description,
- icon: data.icon,
+ description: ( data.description ? data.description : '' ),
+ icon: ( data.icon ? data.icon : '' ),
- bgColor: data.bgColor,
+ bgColor: data.bgColor || colours[0],
- color: data.color || colours[1],
+ color: ( data.color ? data.color : '' ),
slug: slug,
- parentCid: 0,
+ parentCid: ( data.parentCid ? data.parentCid : 0 ),
topic_count: 0,
post_count: 0,
disabled: 0,