Making WordPress.org

Changeset 1107


Ignore:
Timestamp:
01/08/2015 08:00:27 PM (10 years ago)
Author:
iandunn
Message:

Central Theme: Check for array type using instanceof instead of ===

The comparison operator returns false.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/js/central.js

    r1106 r1107  
    7777
    7878                // Check for success
    79                 if ( response.hasOwnProperty( 'data' ) && response.data.hasOwnProperty( 'tweets' ) && response.data.tweets === Array ) {
     79                if ( response.hasOwnProperty( 'data' ) && response.data.hasOwnProperty( 'tweets' ) && response.data.tweets instanceof Array ) {
    8080                    tweets = response.data.tweets;
    8181                } else {
Note: See TracChangeset for help on using the changeset viewer.