From 471d616e1e602039cb17d4856bd2592e5deb367e Mon Sep 17 00:00:00 2001 From: SaPl Date: Tue, 5 Apr 2022 09:11:28 +0200 Subject: [PATCH] Fixes #5143 --- server/models/pages.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)