Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
madhums committed Jan 2, 2020
1 parent d3f8e1f commit a5e0be3
Show file tree
Hide file tree
Showing 4 changed files with 2,333 additions and 2,339 deletions.
5 changes: 4 additions & 1 deletion app/models/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const notify = require('../mailer');
const Schema = mongoose.Schema;

const getTags = tags => tags.join(',');
const setTags = tags => tags.split(',').slice(0, 10); // max tags
const setTags = tags => {
if (!Array.isArray(tags)) return tags.split(',').slice(0, 10); // max tags
return [];
};

/**
* Article Schema
Expand Down
Loading

0 comments on commit a5e0be3

Please sign in to comment.