refactor: handle undefined in Object.keys

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
Noah 2024-04-18 08:46:44 +02:00 committed by GitHub
parent 8a086da698
commit 0083091ea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,6 @@ addPatch({
], ],
shouldIgnore(state: any) { shouldIgnore(state: any) {
return Object.keys(state?.default?.lastDeviceConnected)?.[0] === "vencord-screen-share"; return Object.keys(state?.default?.lastDeviceConnected ?? {})?.[0] === "vencord-screen-share";
} }
}); });