diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 542679d..e74d999 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -118,7 +118,7 @@ export default () => (
{stateLabels[app.state]}
- {app.port && Port: {app.port}}
+ {app.port ? Port: {app.port} : null}
{app.started && Started: {new Date(app.started).toLocaleString()}}
diff --git a/src/server/apps.ts b/src/server/apps.ts
index e5de418..397f519 100644
--- a/src/server/apps.ts
+++ b/src/server/apps.ts
@@ -137,6 +137,7 @@ const runApp = async (dir: string, port: number) => {
// Reset to stopped state (or invalid if no longer valid)
app.state = isApp(dir) ? 'stopped' : 'invalid'
app.proc = undefined
+ app.port = undefined
app.started = undefined
})
}