auto-git:
[change] src/serialization/local-draft-storage.ts
This commit is contained in:
@@ -253,8 +253,6 @@ export function saveSceneDocumentDraft(
|
|||||||
options: SaveSceneDocumentDraftOptions = {}
|
options: SaveSceneDocumentDraftOptions = {}
|
||||||
): SaveSceneDocumentDraftResult {
|
): SaveSceneDocumentDraftResult {
|
||||||
try {
|
try {
|
||||||
assertProjectDocumentIsValid(document);
|
|
||||||
|
|
||||||
const maxSerializedBytes =
|
const maxSerializedBytes =
|
||||||
options.maxSerializedBytes ?? DEFAULT_SCENE_DRAFT_MAX_SERIALIZED_BYTES;
|
options.maxSerializedBytes ?? DEFAULT_SCENE_DRAFT_MAX_SERIALIZED_BYTES;
|
||||||
const estimatedDraftBytes = estimateProjectDraftSerializedBytes(
|
const estimatedDraftBytes = estimateProjectDraftSerializedBytes(
|
||||||
@@ -278,6 +276,8 @@ export function saveSceneDocumentDraft(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assertProjectDocumentIsValid(document);
|
||||||
|
|
||||||
const rawDraft = JSON.stringify({
|
const rawDraft = JSON.stringify({
|
||||||
format: EDITOR_DRAFT_ENVELOPE_FORMAT,
|
format: EDITOR_DRAFT_ENVELOPE_FORMAT,
|
||||||
document,
|
document,
|
||||||
|
|||||||
Reference in New Issue
Block a user