Skip to content

Commit e4c8f77

Browse files
committed
DBC22-6776: fixed sonar scan alerts part 2
1 parent 6b5539a commit e4c8f77

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • src/frontend/src/Components/map/handlers

src/frontend/src/Components/map/handlers/click.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export const eventClickHandler = (
295295
isCamDetail,
296296
) => {
297297
// reset previous clicked feature
298-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
298+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
299299
resetClickedStates(
300300
feature,
301301
clickedFeatureRef,
@@ -330,7 +330,7 @@ export const ferryClickHandler = (
330330
isCamDetail,
331331
) => {
332332
// reset previous clicked feature
333-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
333+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
334334
resetClickedStates(
335335
feature,
336336
clickedFeatureRef,
@@ -356,7 +356,7 @@ const weatherClickHandler = (
356356
updateClickedFeature,
357357
isCamDetail,
358358
) => {
359-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
359+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
360360
// reset previous clicked feature
361361
resetClickedStates(
362362
feature,
@@ -382,7 +382,7 @@ const regionalClickHandler = (
382382
updateClickedFeature,
383383
isCamDetail,
384384
) => {
385-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
385+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
386386
// reset previous clicked feature
387387
resetClickedStates(
388388
feature,
@@ -411,7 +411,7 @@ const hefClickHandler = (
411411
isCamDetail,
412412
) => {
413413
// reset previous clicked feature
414-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
414+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
415415
resetClickedStates(
416416
feature,
417417
clickedFeatureRef,
@@ -438,7 +438,7 @@ const restStopClickHandler = (
438438
isCamDetail,
439439
) => {
440440
// reset previous clicked feature
441-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
441+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
442442
resetClickedStates(
443443
feature,
444444
clickedFeatureRef,
@@ -477,7 +477,7 @@ const routeClickHandler = (
477477
updateClickedFeature,
478478
) => {
479479
// reset previous clicked feature
480-
if (!(clickedFeatureRef.current?.values_?.type === 'camera')) {
480+
if (clickedFeatureRef.current?.values_?.type !== 'camera') {
481481
resetClickedStates(
482482
feature,
483483
clickedFeatureRef,
@@ -501,7 +501,7 @@ const borderCrossingClickHandler = (
501501
isCamDetail,
502502
) => {
503503
// reset previous clicked feature
504-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
504+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
505505
resetClickedStates(
506506
feature,
507507
clickedFeatureRef,
@@ -543,7 +543,7 @@ export const wildfireClickHandler = (
543543
isCamDetail,
544544
) => {
545545
// reset previous clicked feature
546-
if (!isCamDetail || !(clickedFeatureRef.current?.values_?.type === 'camera')) {
546+
if (!isCamDetail || clickedFeatureRef.current?.values_?.type !== 'camera') {
547547
resetClickedStates(
548548
feature,
549549
clickedFeatureRef,
@@ -799,7 +799,7 @@ export const dmsClickHandler = (
799799
isCamDetail,
800800
) => {
801801
// reset previous clicked feature
802-
if (!(clickedFeatureRef.current?.values_?.type === 'camera')) {
802+
if (clickedFeatureRef.current?.values_?.type !== 'camera') {
803803
resetClickedStates(
804804
feature,
805805
clickedFeatureRef,

0 commit comments

Comments
 (0)