Skip to content

Commit adff008

Browse files
committed
refactor: use isRegExp for safer check
1 parent 9f576aa commit adff008

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/core/vdom/patch.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
isUndef,
2424
isTrue,
2525
makeMap,
26+
isRegExp,
2627
isPrimitive
2728
} from '../util/index'
2829

@@ -123,7 +124,7 @@ export function createPatchFunction (backend) {
123124
!(
124125
config.ignoredElements.length &&
125126
config.ignoredElements.some(ignore => {
126-
return ignore instanceof RegExp
127+
return isRegExp(ignore)
127128
? ignore.test(tag)
128129
: ignore === tag
129130
})

0 commit comments

Comments
 (0)