Skip to content

Commit 70da3c5

Browse files
gkelloggdavidlehn
authored andcommitted
Fix matching on no @type
1 parent 06a2e38 commit 70da3c5

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

lib/frame.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -434,21 +434,18 @@ function _filterSubject(state, subject, frame, flags) {
434434
return false;
435435
}
436436
matchThis = true;
437-
continue;
438-
}
439-
if(frame['@type'].length === 1 && types.isEmptyObject(frame['@type'][0])) {
437+
} else if(frame['@type'].length === 1 && types.isEmptyObject(frame['@type'][0])) {
440438
// match on wildcard @type
441439
matchThis = nodeValues.length > 0;
442-
continue;
443-
}
444-
445-
// match on a specific @type
446-
for(const type of frame['@type']) {
447-
if(nodeValues.some(tt => tt == type)) {
448-
return true;
440+
} else {
441+
// match on a specific @type
442+
for(const type of frame['@type']) {
443+
if(nodeValues.some(tt => tt == type)) {
444+
return true;
445+
}
449446
}
447+
return false;
450448
}
451-
return false;
452449
}
453450
}
454451

tests/test-common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const TEST_TYPES = {
6060
},
6161
'jld:FrameTest': {
6262
skip: {
63-
regex: [/tp/, /t0031/, /t0051/]
63+
regex: [/tp/, /t0051/]
6464
},
6565
fn: 'frame',
6666
params: [

0 commit comments

Comments
 (0)