0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

Changed create API method to use new Function() instead of anindirect eval.

This commit is contained in:
Taylor Zane Glaeser 2017-03-09 20:02:05 -06:00
parent 9c93ea6c7a
commit 085f5fc81d

View File

@ -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 );