Skip to content

Commit

Permalink
fix: deep-inspect note tag's in resolver before lazy-returning
Browse files Browse the repository at this point in the history
  • Loading branch information
neopostmodern committed Dec 8, 2024
1 parent 57b4a6e commit 90cc520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/notes/notesResolvers.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Link, Note, Text } from './notesModels.mts'

const INoteResolvers = {
async tags(note, args, context) {
if (note.tags) {
if (note.tags && note.tags.every((tag) => 'permissions' in tag)) {
return note.tags.filter(
(tag) => tag.permissions[context.user._id].tag.read,
)
Expand Down

0 comments on commit 90cc520

Please sign in to comment.