PinDMs: Fix canary crash

This commit is contained in:
Vendicated 2023-10-25 00:38:02 +02:00
parent 1a1d9b07e8
commit 97c0face2f
No known key found for this signature in database
GPG Key ID: D66986BAF75ECF18

View File

@ -81,7 +81,7 @@ export default definePlugin({
// array with the count, or an empty array. Due to spreading, only in the former
// case will an element be added to the outer array
// Thanks for the fix, Strencher!
replace: "$&...$1.props.pinCount,"
replace: "$&...($1.props.pinCount ?? []),"
},
{
// Patch renderSection (renders the header) to set the text to "Pinned DMs" instead of "Direct Messages"