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:
parent
9c93ea6c7a
commit
085f5fc81d
@ -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…
Reference in New Issue
Block a user