From 6dd63ae6444835ae7b50948fa1c5a32eb4e62903 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 Jan 2018 19:17:46 +0000 Subject: [PATCH] Null guard against falsey (non-null) props.node, to make react happy Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/elements/Quote.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/Quote.js b/src/components/views/elements/Quote.js index 0c0078978d..761f7aa151 100644 --- a/src/components/views/elements/Quote.js +++ b/src/components/views/elements/Quote.js @@ -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; } }