Skip to content

Commit 5413b16

Browse files
committed
fix: split not a function error
1 parent 43c021e commit 5413b16

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/opencode/src/cli/cmd/tui/routes/session

‎packages/opencode/src/cli/cmd/tui/routes/session/index.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,10 @@ ToolRegistry.register<typeof WriteTool>({
13101310
container: "block",
13111311
render(props) {
13121312
const { theme, syntax } = useTheme()
1313-
const lines = createMemo(() => props.input.content?.split("\n") ?? [], [] as string[])
1313+
const lines = createMemo(
1314+
() => (typeof props.input.content === "string" ? props.input.content.split("\n") : []),
1315+
[] as string[],
1316+
)
13141317
const code = createMemo(() => {
13151318
if (!props.input.content) return ""
13161319
const text = props.input.content

0 commit comments

Comments
 (0)