Allow unset topics in posts too.

This commit is contained in:
Péter Szilágyi 2015-04-16 18:13:47 +03:00
parent af443f2acb
commit 6a058b690b
1 changed files with 3 additions and 0 deletions

View File

@ -159,6 +159,9 @@ var inputPostFormatter = function(post) {
post.priority = utils.fromDecimal(post.priority);
// fallback
if (post.topics == undefined) {
post.topics = []
}
if (!utils.isArray(post.topics)) {
post.topics = [post.topics];
}