diff --git a/lib/async.js b/lib/async.js index 46992d5..e5eac8c 100644 --- a/lib/async.js +++ b/lib/async.js @@ -68,7 +68,7 @@ function setupAsync(opts, required) { function checkGenerators(opts, required) { /* jshint evil: true */ try { - eval('(function*(){})()'); + (new Function('(function*(){})()'))(); return true; } catch(e) { /* istanbul ignore next */ @@ -80,7 +80,7 @@ function checkGenerators(opts, required) { function checkAsyncFunction(opts, required) { /* jshint evil: true */ try { - eval('(async function(){})()'); + (new Function('(async function(){})()'))(); /* istanbul ignore next */ return true; } catch(e) { diff --git a/package.json b/package.json index 9da4f40..3452d0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ajv", - "version": "4.7.1", + "version": "4.7.2", "description": "Another JSON Schema Validator", "main": "lib/ajv.js", "webpack": "dist/ajv.bundle.js",