Skip to content

Commit e7d2a57

Browse files
authored
Fix optional chaining in tag explorer exclude example (#2200)
Prevents null pointer
1 parent ef29c69 commit e7d2a57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/features/explorer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ You can access the tags of a file by `node.data.tags`.
162162
Component.Explorer({
163163
filterFn: (node) => {
164164
// exclude files with the tag "explorerexclude"
165-
return node.data.tags?.includes("explorerexclude") !== true
165+
return node.data?.tags?.includes("explorerexclude") !== true
166166
},
167167
})
168168
```

0 commit comments

Comments
 (0)