mirror of
https://github.com/wassname/talk.git
synced 2026-10-01 12:42:56 +08:00
Gracefully handle when data is not available
This commit is contained in:
1 parent
00f365ab38
commit
de90bdbd19
1 file changed
+3
-1
@@ -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