Skip to content

Commit

Permalink
fix: missing type in job (toeverything#7087)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul-Mirone authored May 17, 2024
1 parent 55a4720 commit 5b10dd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/framework/store/src/transformer/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Doc } from '../store/index.js';
import type { DocsPropertiesMeta } from '../store/meta.js';
import { AssetsManager } from './assets.js';
import { BaseBlockTransformer } from './base.js';
import { type DraftModel } from './draft.js';
import { type DraftModel, toDraftModel } from './draft.js';
import type {
BeforeExportPayload,
BeforeImportPayload,
Expand Down Expand Up @@ -386,14 +386,14 @@ export class Job {
SliceSnapshotSchema.parse(snapshot);
const { content, pageVersion, workspaceVersion, workspaceId, pageId } =
snapshot;
const contentBlocks = [];
const contentBlocks: BlockModel[] = [];
for (const [i, block] of content.entries()) {
contentBlocks.push(
await this._snapshotToBlock(block, doc, parent, (index ?? 0) + i)
);
}
const slice = new Slice({
content: contentBlocks,
content: contentBlocks.map(block => toDraftModel(block)),
pageVersion,
workspaceVersion,
workspaceId,
Expand Down

0 comments on commit 5b10dd6

Please sign in to comment.