Skip to content

Commit a87e420

Browse files
lerouxbaddaleax
andauthored
Update packages/browser-repl/src/components/shell.tsx
Co-authored-by: Anna Henningsen <[email protected]>
1 parent e3bf5f7 commit a87e420

File tree

1 file changed

+2
-2
lines changed
  • packages/browser-repl/src/components

1 file changed

+2
-2
lines changed

packages/browser-repl/src/components/shell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ export const Shell = ({
338338

339339
const onInput = useCallback(
340340
async (code: string) => {
341-
const newOutput = (output ?? []).slice();
342-
const newHistory = (history ?? []).slice();
341+
const newOutput = [...output ?? []];
342+
const newHistory = [...history ?? []];
343343

344344
// don't evaluate empty input, but do add it to the output
345345
if (!code || code.trim() === '') {

0 commit comments

Comments
 (0)