mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-11 12:16:24 +03:00
Suppress more errors from spurious postMessage calls on the demo instance
This commit is contained in:
parent
0792c9a555
commit
f2d243443b
1 changed files with 1 additions and 1 deletions
|
@ -481,7 +481,7 @@ const onMessage = function(event) {
|
||||||
// All strings start with the empty string, so for sanity return if the length
|
// All strings start with the empty string, so for sanity return if the length
|
||||||
// of the event origin is 0.
|
// of the event origin is 0.
|
||||||
let url = SdkConfig.get().integrations_ui_url;
|
let url = SdkConfig.get().integrations_ui_url;
|
||||||
if (event.origin.length === 0 || !url.startsWith(event.origin)) {
|
if (event.origin.length === 0 || !url.startsWith(event.origin) || !event.data.action) {
|
||||||
return; // don't log this - debugging APIs like to spam postMessage which floods the log otherwise
|
return; // don't log this - debugging APIs like to spam postMessage which floods the log otherwise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue