From 656a62e23ff2ea1748ea7a014ef9d94fbba91c0f Mon Sep 17 00:00:00 2001
From: ThibG
Date: Mon, 14 Sep 2020 15:05:22 +0200
Subject: [PATCH] [Glitch] Add paragraph about browser add-ons when
encountering some errors
Port 75dc5d61e513546b1ffb0abd8546416d1413634d to glitch-soc
Signed-off-by: Thibaut Girka
---
.../flavours/glitch/components/error_boundary.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/javascript/flavours/glitch/components/error_boundary.js b/app/javascript/flavours/glitch/components/error_boundary.js
index 8998802b1b..8e6cd14617 100644
--- a/app/javascript/flavours/glitch/components/error_boundary.js
+++ b/app/javascript/flavours/glitch/components/error_boundary.js
@@ -48,6 +48,8 @@ export default class ErrorBoundary extends React.PureComponent {
if (!hasError) return this.props.children;
+ const likelyBrowserAddonIssue = errorMessage && errorMessage.includes('NotFoundError');
+
let debugInfo = '';
if (stackTrace) {
debugInfo += 'Stack trace\n-----------\n\n```\n' + errorMessage + '\n' + stackTrace.toString() + '\n```';
@@ -70,6 +72,14 @@ export default class ErrorBoundary extends React.PureComponent {
+ { likelyBrowserAddonIssue && (
+ -
+
+
+ ) }
-