Hi everyone!
Recently I’ve faced with an unpleasing issue related with export.
I have some components (in external library) and their instances (in another project). I have a custom plugin that initially finds all such instances and then does some processing of their main components (using InstanceNode.mainComponent). While processing plugin exports some inner nodes of the components as SVG.
Code snippet:
async function exportToSvg(node: ExportMixin) {
const settings = { format: 'SVG' } as ExportSettingsSVG;
return node.exportAsync(settings)
.then(data => { return String.fromCharCode.apply(null, new Uint16Array(data)); })
.catch(**reason** => { /* some error handling */ });
}
And the issue is that export fails if node for export is from the subtree of remote component. In case of local component export operation succeeds, in case of instance of the same remote component export succeeds too.
In case of fail reason variable receives very generic error message: “Failed to export node”.
Is this expected behaviour or a bug?