mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 19:18:07 +01:00
[Glitch] Add paragraph about browser add-ons when encountering some errors
Port b67caf9be4
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
14869ee656
commit
f8205b7b4a
1 changed files with 10 additions and 0 deletions
|
@ -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 {
|
|||
<FormattedMessage id='web_app_crash.content' defaultMessage='You could try any of the following:' />
|
||||
</p>
|
||||
<ul>
|
||||
{ likelyBrowserAddonIssue && (
|
||||
<li>
|
||||
<FormattedMessage
|
||||
id='web_app_crash.disable_addons'
|
||||
defaultMessage='Disable browser add-ons or built-in translation tools'
|
||||
/>
|
||||
</li>
|
||||
) }
|
||||
<li>
|
||||
<FormattedMessage
|
||||
id='web_app_crash.report_issue'
|
||||
|
|
Loading…
Reference in a new issue