summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/internal/bootstrap/pre_execution.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index ed5a5afe4b..e9571a89a6 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -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