mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
[EC-598] fix: messenger crashing
The messenger is listening to all DOM communcation, most of which is formatted differently. We were not handling these cases properly which resulted in attempts to access undefined fields.
This commit is contained in:
@@ -40,7 +40,9 @@ export class Messenger {
|
||||
|
||||
const promise = firstValueFrom(
|
||||
this.channel.messages$.pipe(
|
||||
filter((m) => m.metadata.requestId === requestId && m.type !== request.type)
|
||||
filter(
|
||||
(m) => m != undefined && m.metadata?.requestId === requestId && m.type !== request.type
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user