Skip to content

AI-native design editor. Open-source Figma alternative.

fix(app): populate all fig pages on open

Danila Poyarkov7f7b000ff0db
diff --git a/src/app/document/io/read.ts b/src/app/document/io/read.ts
index 13494ec95..d145aa3b4 100644
--- a/src/app/document/io/read.ts
+++ b/src/app/document/io/read.ts
@@ -44,7 +44,7 @@ export function createOpenActions({
try {
state.loading = true
await yieldToUI()
- const imported = await readFigFile(file, { populate: 'first-page' })
+ const imported = await readFigFile(file)
await yieldToUI()
await applyImportedDocument(editor, imported)
state.documentName = file.name.replace(/\.fig$/i, '')
diff --git a/src/app/document/io/reload-source.ts b/src/app/document/io/reload-source.ts
index 0191d0438..662608bb0 100644
--- a/src/app/document/io/reload-source.ts
+++ b/src/app/document/io/reload-source.ts
@@ -18,12 +18,12 @@ export async function readReloadSource({
const bytes = await tauriRead(filePath)
const blob = new Blob([bytes])
const file = new File([blob], `${documentName}.fig`)
- return readFigFile(file, { populate: 'first-page' })
+ return readFigFile(file)
}
if (fileHandle) {
const file = await fileHandle.getFile()
- return readFigFile(file, { populate: 'first-page' })
+ return readFigFile(file)
}
return null
diff --git a/src/app/tabs/index.ts b/src/app/tabs/index.ts
index 7364fd46b..3aca12909 100644
--- a/src/app/tabs/index.ts
+++ b/src/app/tabs/index.ts
@@ -108,7 +108,7 @@ export async function openFileInNewTab(
try {
const isFig = file.name.toLowerCase().endsWith('.fig')
const { graph: imported, sourceFormat } = isFig
- ? { graph: await readFigFile(file, { populate: 'first-page' }), sourceFormat: 'fig' }
+ ? { graph: await readFigFile(file), sourceFormat: 'fig' }
: await io.readDocument({
name: file.name,
mimeType: file.type || undefined,