mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-13 16:43:04 -04:00
[skip ci] Fix handleComponentFailed spam
This commit is contained in:
parent
c25bc0ff4b
commit
244d10dc9e
5 changed files with 38 additions and 4 deletions
|
@ -22,6 +22,7 @@ import { classNameFactory } from "@api/Styles";
|
|||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { handleComponentFailed } from "@components/handleComponentFailed";
|
||||
import { isMobile } from "@utils/misc";
|
||||
import { onlyOnce } from "@utils/onlyOnce";
|
||||
import { Forms, SettingsRouter, TabBar, Text } from "@webpack/common";
|
||||
|
||||
import BackupRestoreTab from "./BackupRestoreTab";
|
||||
|
@ -86,8 +87,10 @@ function Settings(props: SettingsProps) {
|
|||
</Forms.FormSection >;
|
||||
}
|
||||
|
||||
const onError = onlyOnce(handleComponentFailed);
|
||||
|
||||
export default function (props: SettingsProps) {
|
||||
return <ErrorBoundary onError={handleComponentFailed}>
|
||||
return <ErrorBoundary onError={onError}>
|
||||
<Settings tab={props.tab} />
|
||||
</ErrorBoundary>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue