Skip to content

Commit f879c0d

Browse files
olaservoclaude
andcommitted
fix: use || instead of ?? for error message fallback
The ?? operator only falls back on null/undefined, so an Error with an empty message (new Error("")) would produce an empty string and render a blank error block. Switch to || so empty strings also fall through to String(error), which produces a non-empty representation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 28e5d13 commit f879c0d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ const App = () => {
955955
}));
956956
} catch (error) {
957957
console.error(`[App] Failed to read resource ${uri}:`, error);
958-
const errorString = (error as Error).message ?? String(error);
958+
const errorString = (error as Error).message || String(error);
959959
setResourceErrorMap((prev) => ({
960960
...prev,
961961
[uri]: errorString,

0 commit comments

Comments
 (0)