diff --git a/src/node_platform.cc b/src/node_platform.cc index 4bb9b919f60a91..7e68b7af891ffb 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(); } }