Skip to content

Commit

Permalink
[Refactor] Use element.matches instead of sizzle
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyerburgh committed Jun 12, 2017
1 parent e8676ce commit 3f10b5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"webpack": "^1.14.0"
},
"dependencies": {
"sizzle": "^2.3.3",
"vue-add-globals": "^1.0.1"
},
"peerDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions src/lib/findMatchingVNodes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { matchesSelector } from 'sizzle';

function findAllVNodes(vNode, nodes = []) {
nodes.push(vNode);

Expand Down Expand Up @@ -28,7 +26,7 @@ function removeDuplicateNodes(vNodes) {
}

function nodeMatchesSelector(node, selector) {
return node.elm && node.elm.getAttribute && matchesSelector(node.elm, selector);
return node.elm && node.elm.getAttribute && node.elm.matches(selector);
}

export default function findMatchingVNodes(vNode, selector) {
Expand Down

0 comments on commit 3f10b5c

Please sign in to comment.