Skip to content

Commit

Permalink
Added fix to the security vulnerbility
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrea committed Dec 27, 2023
1 parent 0ee666b commit 9928267
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/modules/tagsFilter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const tagsFilter = (tags) => {
if (tags.includes('|')) {
return { $in: tags.split('|') };
if (typeof tags === 'string') {
if (tags.includes('|')) {
return { $in: tags.split('|') };
}
return { $all: tags.split(',') };
}
return { $all: tags.split(',') };
};

export default tagsFilter;

0 comments on commit 9928267

Please sign in to comment.