Make WordPress Core

Changeset 48040


Ignore:
Timestamp:
06/14/2020 11:26:22 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in js/_enqueues/lib/ajax-response.js.

Props ankitmaru.
Fixes #50320.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/ajax-response.js

    r47122 r48040  
    2121        var parsed = {}, re = jQuery('#' + r).empty(), err = '';
    2222
    23         if ( x && typeof x == 'object' && x.getElementsByTagName('wp_ajax') ) {
     23        if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) {
    2424            parsed.responses = [];
    2525            parsed.errors = false;
     
    5252        if ( isNaN(x) ) { return !re.html('<div class="error"><p>' + x + '</p></div>'); }
    5353        x = parseInt(x,10);
    54         if ( -1 == x ) { return !re.html('<div class="error"><p>' + wpAjax.noPerm + '</p></div>'); }
     54        if ( -1 === x ) { return !re.html('<div class="error"><p>' + wpAjax.noPerm + '</p></div>'); }
    5555        else if ( 0 === x ) { return !re.html('<div class="error"><p>' + wpAjax.broken  + '</p></div>'); }
    5656        return true;
Note: See TracChangeset for help on using the changeset viewer.