Fix optional chaining in tag explorer exclude example (#2200)
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled

Prevents null pointer
This commit is contained in:
Sidney 2025-11-11 18:14:04 +01:00 committed by GitHub
parent ef29c69828
commit e7d2a57aad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,7 +162,7 @@ You can access the tags of a file by `node.data.tags`.
Component.Explorer({
filterFn: (node) => {
// exclude files with the tag "explorerexclude"
return node.data.tags?.includes("explorerexclude") !== true
return node.data?.tags?.includes("explorerexclude") !== true
},
})
```