mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 03:43:48 +08:00
Gracefully handle when data is not available
This commit is contained in:
@@ -30,7 +30,9 @@ function filterProps(props, fragments) {
|
||||
if (!(key in props)) {
|
||||
return;
|
||||
}
|
||||
filtered[key] = filter(fragments[key], props[key], props.data.variables);
|
||||
filtered[key] = props.data
|
||||
? filter(fragments[key], props[key], props.data.variables)
|
||||
: props[key];
|
||||
});
|
||||
return filtered;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user