Skip to content

Commit d4dbe29

Browse files
authored
fix(plugins/better-calls): prevent crash in bot dm
1 parent dc12213 commit d4dbe29

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎plugins/better-calls/src/patches/silentCall.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export const patch = (storage: PluginStorage, unpatches: UnpatchFunction[]) => {
7171
const fragmentProps = rt?.props?.children?.[0]?.props
7272

7373
// This can occasionally be undefined because when you call someone, the call buttons are removed and replaced with the hang up button
74-
if (fragmentProps?.children)
74+
// In bot DMs, it's an object.
75+
if (Array.isArray(fragmentProps?.children))
7576
fragmentProps.children = [
7677
<IconButton
7778
key="better-calls:silent-call-toggle"

0 commit comments

Comments
 (0)