Parcourir la source

fix: text.split (#17842)

tags/1.3.0
crazywoola il y a 6 mois
Parent
révision
7ee5cc80a2
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      web/app/components/base/prompt-editor/utils.ts

+ 1
- 1
web/app/components/base/prompt-editor/utils.ts Voir le fichier

@@ -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: {

Chargement…
Annuler
Enregistrer