From e100513b37d91b8925fcd89ca12cd507ddb53907 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Sat, 2 Mar 2024 23:04:53 +0000 Subject: [PATCH] fix: re-implement quote settings that weren't working (see #638) --- src/features/quote/Quote.jsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/features/quote/Quote.jsx b/src/features/quote/Quote.jsx index 054b4b14..8be09032 100644 --- a/src/features/quote/Quote.jsx +++ b/src/features/quote/Quote.jsx @@ -220,7 +220,7 @@ class Quote extends PureComponent { ? customQuote[Math.floor(Math.random() * customQuote.length)] : null; - if (customQuote !== undefined) { + if (customQuote !== undefined && customQuote !== null) { return this.setState({ quote: '"' + customQuote.quote + '"', author: customQuote.author, @@ -467,12 +467,14 @@ class Quote extends PureComponent { ) : (
-
- {this.state.authorimg === undefined || this.state.authorimg ? '' : } -
+ {localStorage.getItem('authorImg') !== 'false' ? ( +
+ {this.state.authorimg === undefined || this.state.authorimg ? '' : } +
+ ) : null} {this.state.author !== null ? (
{this.state.author} @@ -492,7 +494,7 @@ class Quote extends PureComponent {
)}
- {this.state.authorOccupation !== 'Unknown' && this.state.authorlink !== '' ? ( + {this.state.authorOccupation !== 'Unknown' && this.state.authorlink !== null ? (