Browse Source

fix: text.split (#17842)

tags/1.3.0
crazywoola 6 months ago
parent
commit
7ee5cc80a2
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      web/app/components/base/prompt-editor/utils.ts

+ 1
- 1
web/app/components/base/prompt-editor/utils.ts View File

} }


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


return JSON.stringify({ return JSON.stringify({
root: { root: {

Loading…
Cancel
Save