summaryrefslogtreecommitdiff
path: root/Userland/Utilities/js.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Utilities/js.cpp')
-rw-r--r--Userland/Utilities/js.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp
index f4142bb907..17a1c3a275 100644
--- a/Userland/Utilities/js.cpp
+++ b/Userland/Utilities/js.cpp
@@ -1331,9 +1331,7 @@ int main(int argc, char** argv)
auto maybe_variable = vm->resolve_binding(variable_name, &global_environment);
if (vm->exception())
break;
- maybe_value = maybe_variable.get_value(interpreter->global_object());
- if (vm->exception())
- break;
+ maybe_value = TRY_OR_DISCARD(maybe_variable.get_value(interpreter->global_object()));
VERIFY(!maybe_value->is_empty());
auto variable = *maybe_value;