mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-11-30 09:47:56 +01:00
Fix optional chaining in tag explorer exclude example (#2200)
Prevents null pointer
This commit is contained in:
@@ -162,7 +162,7 @@ You can access the tags of a file by `node.data.tags`.
|
|||||||
Component.Explorer({
|
Component.Explorer({
|
||||||
filterFn: (node) => {
|
filterFn: (node) => {
|
||||||
// exclude files with the tag "explorerexclude"
|
// exclude files with the tag "explorerexclude"
|
||||||
return node.data.tags?.includes("explorerexclude") !== true
|
return node.data?.tags?.includes("explorerexclude") !== true
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user