aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/webControls
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-28 13:48:21 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-28 13:48:21 +0530
commit99ca310c73024b51fed1f3077375eed7827f2c20 (patch)
tree2bd15986f448129a2291acba90ccc6bf68a233e0 /src/features/webControls
parentDisable in-app auto-updates for portable windows installation (fixes #1088) (... (diff)
downloadferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.gz
ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.zst
ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.zip
Fix issues reported by sonarqube linter
Diffstat (limited to 'src/features/webControls')
-rw-r--r--src/features/webControls/components/WebControls.tsx13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/features/webControls/components/WebControls.tsx b/src/features/webControls/components/WebControls.tsx
index 74b343948..e76fca6a2 100644
--- a/src/features/webControls/components/WebControls.tsx
+++ b/src/features/webControls/components/WebControls.tsx
@@ -34,10 +34,11 @@ const messages = defineMessages({
34 }, 34 },
35}); 35});
36 36
37const buttonTransition = 37const buttonTransition = window?.matchMedia(
38 window && window.matchMedia('(prefers-reduced-motion: no-preference)') 38 '(prefers-reduced-motion: no-preference)',
39 ? 'opacity 0.25s' 39)
40 : 'none'; 40 ? 'opacity 0.25s'
41 : 'none';
41 42
42const styles = theme => ({ 43const styles = theme => ({
43 root: { 44 root: {
@@ -211,7 +212,7 @@ class WebControls extends Component<IProps, IState> {
211 }); 212 });
212 navigate(inputUrl); 213 navigate(inputUrl);
213 214
214 if (this.inputRef && this.inputRef.current) { 215 if (this.inputRef?.current) {
215 this.inputRef.current.blur(); 216 this.inputRef.current.blur();
216 } 217 }
217 } else if (event.key === 'Escape') { 218 } else if (event.key === 'Escape') {
@@ -220,7 +221,7 @@ class WebControls extends Component<IProps, IState> {
220 inputUrl: url, 221 inputUrl: url,
221 }); 222 });
222 223
223 if (this.inputRef && this.inputRef.current) { 224 if (this.inputRef?.current) {
224 this.inputRef.current.blur(); 225 this.inputRef.current.blur();
225 } 226 }
226 } 227 }