Skip to content

Commit 8a4b5c6

Browse files
committed
src: use Check() instead of FromJust in environment
This commit replaces FromJust() calls with Check() in places where the value that FromJust() returns is not used. PR-URL: nodejs#33706 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
1 parent b9739b6 commit 8a4b5c6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/api/environment.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ void InitializeContextRuntime(Local<Context> context) {
555555
if (context->Global()->Get(context, intl_string).ToLocal(&intl_v) &&
556556
intl_v->IsObject()) {
557557
Local<Object> intl = intl_v.As<Object>();
558-
intl->Delete(context, break_iter_string).FromJust();
558+
intl->Delete(context, break_iter_string).Check();
559559
}
560560

561561
// Delete `Atomics.wake`
@@ -566,7 +566,7 @@ void InitializeContextRuntime(Local<Context> context) {
566566
if (context->Global()->Get(context, atomics_string).ToLocal(&atomics_v) &&
567567
atomics_v->IsObject()) {
568568
Local<Object> atomics = atomics_v.As<Object>();
569-
atomics->Delete(context, wake_string).FromJust();
569+
atomics->Delete(context, wake_string).Check();
570570
}
571571

572572
// Remove __proto__

0 commit comments

Comments
 (0)