File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ var canReflect = require("can-reflect");
5
5
var andOrNot = require ( "./and-or-not" ) ;
6
6
var helpers = require ( "../helpers" ) ;
7
7
var defineLazyValue = require ( "can-define-lazy-value" ) ;
8
+ var canSymbol = require ( "can-symbol" ) ;
9
+ var isMemberSymbol = canSymbol . for ( "can.isMember" ) ;
8
10
9
11
// TYPES FOR FILTERING
10
12
var KeysAnd = andOrNot . KeysAnd ,
@@ -25,11 +27,11 @@ function makeSort(schemaKeys, hydrateAndValue){
25
27
// valueA is GT valueB
26
28
$gt : function ( valueA , valueB ) {
27
29
var $gt = hydrateAndValue ( { $gt : valueB } , key , schemaProp ) ;
28
- return $gt . isMember ( valueA ) ;
30
+ return $gt [ isMemberSymbol ] ( valueA ) ;
29
31
} ,
30
32
$lt : function ( valueA , valueB ) {
31
33
var $lt = hydrateAndValue ( { $lt : valueB } , key , schemaProp ) ;
32
- return $lt . isMember ( valueA ) ;
34
+ return $lt [ isMemberSymbol ] ( valueA ) ;
33
35
}
34
36
} ;
35
37
} ) ;
Original file line number Diff line number Diff line change 1
1
var set = require ( "../set" ) ;
2
2
var arrayUnionIntersectionDifference = require ( "../array-union-intersection-difference" ) ;
3
-
3
+ var canSymbol = require ( "can-symbol" ) ;
4
+ var isMemberSymbol = canSymbol . for ( "can.isMember" ) ;
4
5
// $ne Matches all values that are not equal to a specified value.
5
6
// $eq Matches values that are equal to a specified value.
6
7
//
@@ -128,6 +129,9 @@ comparisons.Or.prototype.isMember = function(value) {
128
129
return and . isMember ( value ) ;
129
130
} ) ;
130
131
} ;
132
+ Object . keys ( comparisons ) . forEach ( function ( name ) {
133
+ comparisons [ name ] . prototype [ isMemberSymbol ] = comparisons [ name ] . prototype . isMember ;
134
+ } ) ;
131
135
132
136
133
137
@@ -959,4 +963,4 @@ names.forEach(function(name1, i) {
959
963
}
960
964
} ) ;
961
965
962
- module . exports = comparisons ;
966
+ module . exports = comparisons ;
You can’t perform that action at this time.
0 commit comments