diff --git a/src/node_platform.cc b/src/node_platform.cc index e2c5aa230d09b1..c15a95128e9d3f 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -409,6 +409,9 @@ void PerIsolatePlatformData::RunForegroundTask(std::unique_ptr task) { InternalCallbackScope::kNoFlags); task->Run(); } else { + // The task is moved out of InternalCallbackScope if env is not available. + // This is a required else block, and should not be removed. + // See comment: https://github.com/nodejs/node/pull/34688#pullrequestreview-463867489 task->Run(); } }