Null guard against falsey (non-null) props.node, to make react happy

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2018-01-29 19:17:46 +00:00
parent ebfdd7c718
commit 6dd63ae644
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E

View file

@ -182,6 +182,7 @@ export default class Quote extends React.Component {
}
// Deliberately render nothing if the URL isn't recognised
return this.props.node;
// in case we get an undefined/falsey node, replace it with null to make React happy
return this.props.node || null;
}
}