mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
refac
This commit is contained in:
parent
81d6e217f1
commit
ce7cc37077
1 changed files with 3 additions and 1 deletions
|
|
@ -215,7 +215,9 @@
|
|||
|
||||
if (state.length === 2 && state[0] === 0 && state[1] === 0) {
|
||||
// Empty state, check if we have content to initialize
|
||||
if (content) {
|
||||
// check if editor empty as well
|
||||
const isEmptyEditor = !editor || editor.getText().trim() === '';
|
||||
if (content && isEmptyEditor) {
|
||||
const pydoc = prosemirrorJSONToYDoc(editor.schema, content);
|
||||
if (pydoc) {
|
||||
Y.applyUpdate(this.doc, Y.encodeStateAsUpdate(pydoc));
|
||||
|
|
|
|||
Loading…
Reference in a new issue