diff --git a/src/node_file.cc b/src/node_file.cc index 285e532f0078e1..a6f801148b996e 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -457,8 +457,7 @@ MaybeLocal FileHandle::ClosePromise() { Local close_resolver = object()->GetInternalField(FileHandle::kClosingPromiseSlot).As(); - if (!close_resolver.IsEmpty() && !close_resolver->IsUndefined()) { - CHECK(close_resolver->IsPromise()); + if (close_resolver->IsPromise()) { return close_resolver.As(); }