We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8a7968 commit d88dc29Copy full SHA for d88dc29
packages/core/src/document/documentStore.ts
@@ -189,8 +189,9 @@ const _getDocumentState = bindActionByDataset(
189
const draft = documentStates[draftId]?.local
190
const published = documentStates[publishedId]?.local
191
192
+ // wait for draft and published to be loaded before returning a value
193
+ if (draft === undefined || published === undefined) return undefined
194
const document = draft ?? published
- if (document === undefined) return undefined
195
if (path) return jsonMatch(document, path).at(0)?.value
196
return document
197
},
0 commit comments