Skip to content

Commit

Permalink
Remove optimistic scan status check from scanError selector
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Aug 7, 2024
1 parent c574a4e commit 7fc705b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions projects/plugins/protect/src/js/state/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,9 @@ const scanInProgress = state => {
* @returns {ScanError|null} The error object or null.
*/
const scanError = state => {
const { status, error, errorCode, errorMessage } = selectors.getStatus( state );
const { error, errorCode, errorMessage } = selectors.getStatus( state );
const unavailable = selectors.getScanIsUnavailable( state );

// When "optimistically" scanning, ignore any errors.
if ( SCAN_STATUS_OPTIMISTICALLY_SCANNING === status ) {
return null;
}

// If the scan results include an error, return it.
if ( error ) {
return { code: errorCode, message: errorMessage };
Expand Down

0 comments on commit 7fc705b

Please sign in to comment.