Skip to content

Commit

Permalink
feat: support RegExp in ignoredElements (vuejs#6769)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondmuller authored and hefeng committed Jan 25, 2019
1 parent 0174452 commit 2a6b74a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/vdom/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ export function createPatchFunction (backend) {
if (
!inPre &&
!vnode.ns &&
!(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&
!(
config.ignoredElements.length &&
config.ignoredElements.some(ignore => {
return ignore instanceof RegExp
? ignore.test(tag)
: ignore === tag
})
) &&
config.isUnknownElement(tag)
) {
warn(
Expand Down

0 comments on commit 2a6b74a

Please sign in to comment.