Skip to content

Commit

Permalink
fix(XbelSerializer)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Dec 9, 2023
1 parent 24f545c commit b91bd1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/serializers/Xbel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ class XbelSerializer implements Serializer {
id: parseInt(node[':@']['@_id']),
parentId: folder.id,
url: node[':@']['@_href'],
title: node.bookmark?.[0]?.title?.[0]?.['#text'] || '',
title: '' + (node.bookmark?.[0]?.title?.[0]?.['#text'] || ''), // cast to string
location: ItemLocation.SERVER,
})
} else if (typeof node.folder !== 'undefined') {
item = new Folder({
id: parseInt(node[':@']?.['@_id']),
title: node.folder?.[0]?.title?.[0]?.['#text'] || '',
title: '' + (node.folder?.[0]?.title?.[0]?.['#text'] || ''), // cast to string
parentId: folder.id,
location: ItemLocation.SERVER,
})
Expand Down

0 comments on commit b91bd1f

Please sign in to comment.