Skip to content

Commit

Permalink
Fix save bug
Browse files Browse the repository at this point in the history
Fix bookmark saving bug
  • Loading branch information
bcomnes committed Mar 5, 2023
1 parent a4b9e1f commit 3f9419b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/api/bookmarks/put-bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ export async function putBookmarks (fastify, opts) {
const results = await client.query(createBookmark)
const bookmark = results.rows[0]

if (tags.length > 0 || serverMeta.tags.length > 0) {
const activeTagSet = tags.length > 0 ? tags : serverMeta.tags
if (tags?.length > 0 || serverMeta?.tags?.length > 0) {
const activeTagSet = tags.length > 0 ? tags : serverMeta?.tags
const createTags = SQL`
INSERT INTO tags (name, owner_id)
VALUES
Expand Down

0 comments on commit 3f9419b

Please sign in to comment.