File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ function isPlainObject(value) {
99function propertyMatchesValue ( documentValue , matcherValue ) {
1010 if ( Array . isArray ( matcherValue ) ) {
1111 return matcherValue . includes ( documentValue ) ;
12- }
13- if ( isPlainObject ( matcherValue ) ) {
12+ } else if ( matcherValue && typeof matcherValue === 'object' ) {
1413 return matches ( documentValue , matcherValue ) ;
1514 }
1615 return typeof matcherValue === 'undefined' || documentValue === matcherValue ;
@@ -156,9 +155,8 @@ function buildRawBufferMatcher(matcher = {}) {
156155function preCheck ( buffer , startOffset , node ) {
157156 for ( const child of node . children ) {
158157 if ( child . valuePatterns && ! child . valuePatterns . some ( ( pattern , i ) => {
159- const match = buffer . indexOf ( pattern , startOffset ) ;
160- child . valueMatches [ i ] = match ;
161- return match !== - 1 ;
158+ child . valueMatches [ i ] = buffer . indexOf ( pattern , startOffset ) ;
159+ return child . valueMatches [ i ] !== - 1 ;
162160 } ) ) {
163161 return false ;
164162 }
You can’t perform that action at this time.
0 commit comments