Skip to content

Commit

Permalink
Update unist-util-is
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed May 31, 2019
1 parent bd81411 commit 51315e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
'use strict'

var is = require('unist-util-is')
var convert = require('unist-util-is/convert')

module.exports = findBefore

function findBefore(parent, index, test) {
var is = convert(test)
var children
var child

Expand All @@ -30,7 +31,7 @@ function findBefore(parent, index, test) {
while (index--) {
child = children[index]

if (is(test, child, index, parent)) {
if (is(child, index, parent)) {
return child
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"index.js"
],
"dependencies": {
"unist-util-is": "^2.0.0"
"unist-util-is": "^3.0.0"
},
"devDependencies": {
"browserify": "^16.0.0",
Expand Down

0 comments on commit 51315e3

Please sign in to comment.