Skip to content

Commit 4ac41da

Browse files
authored
fix: destructure AttachSession tuple correctly for buffer rendering (#53)
AttachSession returns a tuple [Session, buffer], not an object. The previous fix accessed result.buffer which is undefined on a tuple. Destructure as [, buffer] to get the second element.
1 parent 349eeba commit 4ac41da

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ui/providers/BottomDrawer/containers/Terminal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ export default function TerminalContainer({ sessionId, tab }: Props) {
309309
});
310310

311311
try {
312-
const result = await ExecClient.AttachSession(sessionId);
313-
if (result.buffer) {
314-
const decoded = textDecoder.decode(Base64.toUint8Array(result.buffer));
312+
const [, buffer] = await ExecClient.AttachSession(sessionId);
313+
if (buffer) {
314+
const decoded = textDecoder.decode(Base64.toUint8Array(buffer));
315315
terminal.write(decoded);
316316
}
317317
} catch (e) {

0 commit comments

Comments
 (0)