Skip to content

Commit a9e4f29

Browse files
committed
no need to use eval to do a dynamic import in JS
1 parent 3f13d23 commit a9e4f29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: idom/client/app/core_modules/layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function useLazyModule(source) {
170170
}
171171

172172
function dynamicImport(source) {
173-
return eval(`import('${source}')`).then(
173+
return import(source).then(
174174
(pkg) => (pkg.default ? pkg.default : pkg),
175175
(error) => {
176176
if (!error.stack) {

0 commit comments

Comments
 (0)