mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-05 06:10:52 -05:00
fix get component property definitions (#169)
This commit is contained in:
parent
14c9d02cc9
commit
5f884985b9
1 changed files with 20 additions and 16 deletions
|
@ -90,6 +90,7 @@ const getComponentTextPropertyOverrides = (
|
||||||
node: InstanceNode,
|
node: InstanceNode,
|
||||||
primaryComponent: ComponentNode | ComponentSetNode
|
primaryComponent: ComponentNode | ComponentSetNode
|
||||||
): ComponentTextPropertyOverride[] => {
|
): ComponentTextPropertyOverride[] => {
|
||||||
|
try {
|
||||||
const componentPropertyDefinitions = Object.entries(
|
const componentPropertyDefinitions = Object.entries(
|
||||||
primaryComponent.componentPropertyDefinitions
|
primaryComponent.componentPropertyDefinitions
|
||||||
).filter(([, value]) => value.type === 'TEXT');
|
).filter(([, value]) => value.type === 'TEXT');
|
||||||
|
@ -108,6 +109,9 @@ const getComponentTextPropertyOverrides = (
|
||||||
} as ComponentTextPropertyOverride;
|
} as ComponentTextPropertyOverride;
|
||||||
})
|
})
|
||||||
.filter(({ value, defaultValue }) => value !== defaultValue);
|
.filter(({ value, defaultValue }) => value !== defaultValue);
|
||||||
|
} catch (error) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const registerTextVariableOverrides = (
|
const registerTextVariableOverrides = (
|
||||||
|
|
Loading…
Reference in a new issue