mirror of
https://github.com/sveltejs/svelte.git
synced 2024-11-30 00:46:29 +01:00
use new Function instead of eval, to prevent Rollup complaining
This commit is contained in:
parent
5a457bfb87
commit
69c41a0373
@ -150,7 +150,7 @@ function create(source: string, _options: CompileOptions = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return (0, eval)(compiled.js.code);
|
return (new Function(compiled.js.code))();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (_options.onerror) {
|
if (_options.onerror) {
|
||||||
_options.onerror(err);
|
_options.onerror(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user