From 429b2882f15c386caa5df4a099a3270120acc75c Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Sun, 1 Feb 2026 13:18:46 -0800 Subject: [PATCH] Terminal eixst --- demo/client/client.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/client/client.ts b/demo/client/client.ts index c16216de..4996bcd2 100644 --- a/demo/client/client.ts +++ b/demo/client/client.ts @@ -327,8 +327,8 @@ function createTerminal(): Terminal { } const cols = size.cols; const rows = size.rows; - const pixelWidth = Math.round(term.dimensions?.css?.canvas?.width ?? 0); - const pixelHeight = Math.round(term.dimensions?.css?.canvas?.height ?? 0); + const pixelWidth = Math.round(term!.dimensions?.css?.canvas?.width ?? 0); + const pixelHeight = Math.round(term!.dimensions?.css?.canvas?.height ?? 0); const url = '/terminals/' + pid + '/size?cols=' + cols + '&rows=' + rows + '&pixelWidth=' + pixelWidth + '&pixelHeight=' + pixelHeight; fetch(url, { method: 'POST' }); @@ -380,8 +380,8 @@ function createTerminal(): Terminal { if (useRealTerminal instanceof HTMLInputElement && !useRealTerminal.checked) { runFakeTerminal(); } else { - const pixelWidth = Math.round(term.dimensions?.css?.canvas?.width ?? 0); - const pixelHeight = Math.round(term.dimensions?.css?.canvas?.height ?? 0); + const pixelWidth = Math.round(term!.dimensions?.css?.canvas?.width ?? 0); + const pixelHeight = Math.round(term!.dimensions?.css?.canvas?.height ?? 0); const res = await fetch('/terminals?cols=' + term!.cols + '&rows=' + term!.rows + '&pixelWidth=' + pixelWidth + '&pixelHeight=' + pixelHeight, { method: 'POST' }); const processId = await res.text(); pid = processId;