diff --git a/server/models/pages.js b/server/models/pages.js index 72c063fa..b0d1aa8e 100644 --- a/server/models/pages.js +++ b/server/models/pages.js @@ -439,7 +439,9 @@ module.exports = class Page extends Model { let page = await WIKI.models.pages.getPageFromDb(ogPage.id) // -> Save Tags - await WIKI.models.tags.associateTags({ tags: opts.tags, page }) + if (opts.tags && opts.tags.length > 0) { + await WIKI.models.tags.associateTags({ tags: opts.tags, page }) + } // -> Render page to HTML await WIKI.models.pages.renderPage(page)