mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
fix: FeMerge on paper (#2384)
# Summary Use empty string (`""`) instead of `undefined` for previous filter result in `FeMergeNode`
This commit is contained in:
@@ -13,7 +13,7 @@ interface FilterPrimitiveCommonProps {
|
||||
}
|
||||
|
||||
export interface NativeProps extends ViewProps, FilterPrimitiveCommonProps {
|
||||
nodes?: ReadonlyArray<UnsafeMixed<string | undefined>>;
|
||||
nodes?: ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
export default codegenNativeComponent<NativeProps>('RNSVGFeMerge');
|
||||
|
||||
@@ -95,7 +95,7 @@ export const extractFeMerge = (
|
||||
props: FeMergeComponentProps,
|
||||
parent: unknown
|
||||
): FeMergeNativeProps => {
|
||||
const nodes: Array<string | undefined> = [];
|
||||
const nodes: Array<string> = [];
|
||||
const childArray = props.children
|
||||
? React.Children.map(props.children, (child) =>
|
||||
React.cloneElement(child, { parent })
|
||||
@@ -106,7 +106,7 @@ export const extractFeMerge = (
|
||||
const {
|
||||
props: { in: in1 },
|
||||
} = childArray[i];
|
||||
nodes.push(in1);
|
||||
nodes.push(in1 || '');
|
||||
}
|
||||
|
||||
return { nodes };
|
||||
|
||||
Reference in New Issue
Block a user