Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat: Prints an error log for errors in child components render methods.

Дамян Минков5c299bcd46a4
diff --git a/react/features/base/app/components/BaseApp.js b/react/features/base/app/components/BaseApp.js
index 5db3384a64..6a567be100 100644
--- a/react/features/base/app/components/BaseApp.js
+++ b/react/features/base/app/components/BaseApp.js
@@ -100,6 +100,18 @@ export default class BaseApp extends Component<*, State> {
this.state.store.dispatch(appWillUnmount(this));
}
+ /**
+ * Logs for errors that were not caught.
+ *
+ * @param {Error} error - The error that was thrown.
+ * @param {Object} info - Info about the error(stack trace);.
+ *
+ * @returns {void}
+ */
+ componentDidCatch(error: Error, info: Object) {
+ logger.error(error, info);
+ }
+
/**
* Delays this {@code BaseApp}'s startup until the {@code Storage}
* implementation of {@code localStorage} initializes. While the