@@ -32,6 +32,14 @@ const executeComparison =
32
32
if ( isNotDefined ( comparison . comparisonOperator ) ) return false
33
33
switch ( comparison . comparisonOperator ) {
34
34
case ComparisonOperators . CONTAINS : {
35
+ if ( Array . isArray ( inputValue ) ) {
36
+ const equal = ( a : string | null , b : string | null ) => {
37
+ if ( typeof a === 'string' && typeof b === 'string' )
38
+ return a . normalize ( ) === b . normalize ( )
39
+ return a !== b
40
+ }
41
+ return compare ( equal , inputValue , value , 'some' )
42
+ }
35
43
const contains = ( a : string | null , b : string | null ) => {
36
44
if ( b === '' || ! b || ! a ) return false
37
45
return a
@@ -43,6 +51,14 @@ const executeComparison =
43
51
return compare ( contains , inputValue , value , 'some' )
44
52
}
45
53
case ComparisonOperators . NOT_CONTAINS : {
54
+ if ( Array . isArray ( inputValue ) ) {
55
+ const notEqual = ( a : string | null , b : string | null ) => {
56
+ if ( typeof a === 'string' && typeof b === 'string' )
57
+ return a . normalize ( ) !== b . normalize ( )
58
+ return a !== b
59
+ }
60
+ return compare ( notEqual , inputValue , value , 'some' )
61
+ }
46
62
const notContains = ( a : string | null , b : string | null ) => {
47
63
if ( b === '' || ! b || ! a ) return true
48
64
return ! a
0 commit comments