@wz927/codedesign 0.3.16 → 0.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1 -1
- package/figma-plugin/dist/code.js +9 -1
- package/package.json +1 -1
|
@@ -473,9 +473,17 @@ async function handle(req) {
|
|
|
473
473
|
return { ok: true };
|
|
474
474
|
}
|
|
475
475
|
case 'exportNode': {
|
|
476
|
+
// Ensure cross-page nodes are accessible in dynamic-page mode.
|
|
477
|
+
const anyFigma = figma;
|
|
478
|
+
if (typeof anyFigma.loadAllPagesAsync === 'function') {
|
|
479
|
+
try {
|
|
480
|
+
await anyFigma.loadAllPagesAsync();
|
|
481
|
+
}
|
|
482
|
+
catch { }
|
|
483
|
+
}
|
|
476
484
|
const n = (await getNode(p.id));
|
|
477
485
|
if (!n || !('exportAsync' in n))
|
|
478
|
-
throw new Error('Node not exportable');
|
|
486
|
+
throw new Error('Node not exportable: ' + p.id);
|
|
479
487
|
const format = ((_j = p.format) !== null && _j !== void 0 ? _j : 'PNG').toUpperCase();
|
|
480
488
|
const settings = { format };
|
|
481
489
|
if (format === 'PNG' || format === 'JPG')
|