Merge pull request #361 from taylorzane/gh-345

Changed `create` API method to use `new Function()`
pull/362/head
Rich Harris 8 years ago committed by GitHub
commit 4e95404f02

@ -57,7 +57,7 @@ export function create ( source, _options = {} ) {
let result;
try {
result = ( 1, eval )( compiled.code );
result = (new Function( 'return ' + compiled.code ))();
} catch ( err ) {
if ( _options.onerror ) {
_options.onerror( err );

Loading…
Cancel
Save