CallTimer: fix crashing on canary

This commit is contained in:
Vendicated 2024-12-07 00:13:59 +01:00
parent df44edd41b
commit a3f5dc39a0
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -75,10 +75,11 @@ export default definePlugin({
patches: [{ patches: [{
find: "renderConnectionStatus(){", find: "renderConnectionStatus(){",
replacement: { replacement: {
match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/, match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i(?=\})/,
replace: "[$&, $self.renderTimer(this.props.channel.id)]" replace: "[$&, $self.renderTimer(this.props.channel.id)]"
} }
}], }],
renderTimer(channelId: string) { renderTimer(channelId: string) {
return <ErrorBoundary noop> return <ErrorBoundary noop>
<this.Timer channelId={channelId} /> <this.Timer channelId={channelId} />