Skip to content

Commit 6ca82b8

Browse files
authored
fix(require): Use statically analyzable dynamic requires (#106)
1 parent ba40c60 commit 6ca82b8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ function getName (candidate) {
120120
* Loads a custom logic module to populate additional distribution information
121121
*/
122122
function customLogic (os, name, file, cb) {
123-
var logic = './logic/' + name + '.js'
124-
try { require(logic)(os, file, cb) } catch (e) { cb(null, os) }
123+
try { require(`./logic/${name}.js`)(os, file, cb) } catch (e) { cb(null, os) }
125124
}
126125

127126
/**

0 commit comments

Comments
 (0)