Skip to content

Commit

Permalink
improve basic find block
Browse files Browse the repository at this point in the history
null => false
return null if not found
  • Loading branch information
rom1504 committed Feb 13, 2019
1 parent e0792bf commit 93de735
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/blocks.js
Expand Up @@ -75,9 +75,10 @@ function inject (bot, { version }) {
}
}
}
return null

function isMatchingType (block) {
return options.matching.indexOf(block.type) >= 0
return block === null ? false : options.matching.indexOf(block.type) >= 0
}
}

Expand Down

0 comments on commit 93de735

Please sign in to comment.