mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Don't report errors while not connected (#17818)
This commit is contained in:
parent
4fd9c63633
commit
d8894a0078
@ -25,6 +25,9 @@ export const loggingMixin = <T extends Constructor<HassBaseEl>>(
|
||||
protected hassConnected() {
|
||||
super.hassConnected();
|
||||
window.addEventListener("error", async (ev) => {
|
||||
if (!this.hass?.connected) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
!__DEV__ &&
|
||||
(ev.message.includes("ResizeObserver loop limit exceeded") ||
|
||||
@ -50,6 +53,9 @@ export const loggingMixin = <T extends Constructor<HassBaseEl>>(
|
||||
});
|
||||
});
|
||||
window.addEventListener("unhandledrejection", async (ev) => {
|
||||
if (!this.hass?.connected) {
|
||||
return;
|
||||
}
|
||||
const { createLogMessage } = await import("../resources/log-message");
|
||||
this._writeLog({
|
||||
message: await createLogMessage(
|
||||
|
Loading…
x
Reference in New Issue
Block a user