Skip to content

Commit 00ee556

Browse files
committed
fallback to nodejs
1 parent 3001f55 commit 00ee556

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

apps/webapp/app/components/RuntimeIcon.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ export function RuntimeIcon({
1818
}: RuntimeIconProps) {
1919
const parsedRuntime = parseRuntime(runtime);
2020

21-
if (!parsedRuntime) {
22-
return <span className="text-text-dimmed"></span>;
23-
}
21+
// Default to Node.js if no runtime is specified
22+
const effectiveRuntime = parsedRuntime || {
23+
runtime: "node" as const,
24+
originalRuntime: "node",
25+
displayName: "Node.js",
26+
};
2427

2528
const getIcon = () => {
26-
switch (parsedRuntime.runtime) {
29+
switch (effectiveRuntime.runtime) {
2730
case "bun":
2831
return <BunLogoIcon className={className} />;
2932
case "node":
@@ -34,7 +37,7 @@ export function RuntimeIcon({
3437
};
3538

3639
const icon = getIcon();
37-
const formattedText = formatRuntimeWithVersion(runtime, runtimeVersion);
40+
const formattedText = formatRuntimeWithVersion(effectiveRuntime.originalRuntime, runtimeVersion);
3841

3942
if (withLabel) {
4043
return (

0 commit comments

Comments
 (0)