Skip to content

Commit 9832bae

Browse files
committed
Use more readable check for data type when kicking off scan
1 parent 8808e3d commit 9832bae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/frontendHighlighterApp/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class AccessibilityCheckerHighlight {
186186
},
187187
);
188188
}
189-
} else if ( ! self._scanAttempted && response.data && response.data[ 0 ] && response.data[ 0 ].code === -3 ) {
189+
} else if ( ! self._scanAttempted && response.data?.[ 0 ]?.code === -3 ) {
190190
// Only try kickoffScan once per highlightAjax call
191191
self._scanAttempted = true;
192192
self.kickoffScan();

0 commit comments

Comments
 (0)