Skip to content

Commit

Permalink
Merge pull request #26 from hinthealth/bug/node
Browse files Browse the repository at this point in the history
fix for newer versions of node where its called "SyntaxError"
  • Loading branch information
EpiphanyMachine authored Oct 11, 2016
2 parents 02a9134 + afeecca commit 06e7f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/behave.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ var tryToFind = function(expression) {
catch (e) {
// Syntax errors occur sometimes when trying to do certain operations
// with ~'s and such. We just want it to return nothing in this case.
if ( !(_.contains(e.message, "Syntax error")) ) {
if ( !(_.contains(e.message, "Syntax error") || _.contains(e.message, "SyntaxError")) ) {
// Re throw if it's not a syntax errors
throw (e)
}
Expand Down

0 comments on commit 06e7f44

Please sign in to comment.