Skip to content

Commit

Permalink
src: only run preloadModules if the preload array is not empty
Browse files Browse the repository at this point in the history
PR-URL: #28012
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
MarshallOfSound authored and antsmartian committed Jun 9, 2019
1 parent abf765e commit 97a4246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function initializeFrozenIntrinsics() {
function loadPreloadModules() {
// For user code, we preload modules if `-r` is passed
const preloadModules = getOptionValue('--require');
if (preloadModules) {
if (preloadModules && preloadModules.length > 0) {
const {
Module: {
_preloadModules
Expand Down

0 comments on commit 97a4246

Please sign in to comment.