File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -843,10 +843,18 @@ if (!window.console) {
843843 * //will match if an item has an attribute 'name' that is equal to 'John' or 'Jim'
844844 */
845845 ClearBlade . Query . prototype . or = function ( that ) {
846- for ( var i = 0 ; i < that . query . FILTERS . length ; i ++ ) {
847- this . query . FILTERS . push ( that . query . FILTERS [ i ] ) ;
846+ if ( this . query . hasOwnProperty ( 'FILTERS' ) && that . query . hasOwnProperty ( 'FILTERS' ) ) {
847+ for ( var i = 0 ; i < that . query . FILTERS . length ; i ++ ) {
848+ this . query . FILTERS . push ( that . query . FILTERS [ i ] ) ;
849+ }
850+ return this ;
851+ } else if ( ! this . query . hasOwnProperty ( 'FILTERS' ) && that . query . hasOwnProperty ( 'FILTERS' ) ) {
852+ for ( var j = 0 ; j < that . query . FILTERS . length ; j ++ ) {
853+ this . query . FILTERS = [ ] ;
854+ this . query . FILTERS . push ( that . query . FILTERS [ j ] ) ;
855+ }
856+ return this ;
848857 }
849- return this ;
850858 } ;
851859
852860 /**
You can’t perform that action at this time.
0 commit comments