Fix optional chaining in tag explorer exclude example (#2200)
Prevents null pointer
This commit is contained in:
parent
ef29c69828
commit
e7d2a57aad
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue