diff --git a/lib/internal/modules/helpers.js b/lib/internal/modules/helpers.js index b04ac126cd35b9..bc9199259a5eb2 100644 --- a/lib/internal/modules/helpers.js +++ b/lib/internal/modules/helpers.js @@ -2,6 +2,7 @@ const { ArrayPrototypeForEach, + ArrayPrototypePush, ObjectDefineProperty, ObjectFreeze, ObjectPrototypeHasOwnProperty, @@ -85,7 +86,7 @@ function initializeCjsConditions() { ...userConditions, ]; if (getOptionValue('--require-module')) { - cjsConditionsArray.push('module-sync'); + ArrayPrototypePush(cjsConditionsArray, 'module-sync'); } ObjectFreeze(cjsConditionsArray); cjsConditions = new SafeSet(cjsConditionsArray);