Skip to content

Commit

Permalink
fix error ui showing config instead of actual error on upgrade (#1992)
Browse files Browse the repository at this point in the history
  • Loading branch information
k0l11 committed Feb 8, 2024
1 parent ee532e4 commit 780c024
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/packages/ui/src/Pages/Viewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ const FromUrl = ({ exec, url, redirect, mode, gitCommit }: FromUrlProps) => {
{ leading: true, trailing: true }
)
);
const handleSetError = (_: string | null, error: string | null) => {
if (error == null) {
return;
}
setError(error);
};

return (
<UpgradableViewer
Expand All @@ -126,7 +132,7 @@ const FromUrl = ({ exec, url, redirect, mode, gitCommit }: FromUrlProps) => {
mode={mode}
gitCommit={gitCommit}
setResult={updateResult.current}
setError={setError} />
setError={handleSetError} />
);
};

Expand Down

0 comments on commit 780c024

Please sign in to comment.