瀏覽代碼

fix: text.split (#17842)

tags/1.3.0
crazywoola 6 月之前
父節點
當前提交
7ee5cc80a2
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      web/app/components/base/prompt-editor/utils.ts

+ 1
- 1
web/app/components/base/prompt-editor/utils.ts 查看文件

@@ -296,7 +296,7 @@ export function $splitNodeContainingQuery(match: MenuTextMatch): TextNode | null
}

export function textToEditorState(text: string) {
const paragraph = text ? text.split('\n') : ['']
const paragraph = text && (typeof text === 'string') ? text.split('\n') : ['']

return JSON.stringify({
root: {

Loading…
取消
儲存