Fixed code smell 'Prefer using an optional chain expression instead, as it's more concise and easier to read'.

This commit is contained in:
Akshay Joshi
2024-01-25 16:51:40 +05:30
parent 41fe1db884
commit 639a28fbfc
52 changed files with 168 additions and 221 deletions

View File

@@ -455,7 +455,7 @@ export default function PreferencesComponent({ ...props }) {
case 'threshold':
return 'threshold';
default:
if (console && console.warn) {
if (console?.warn) {
// Warning for developer only.
console.warn(
'Hmm.. We don\'t know how to render this type - \'\'' + type + '\' of control.'