summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/test-web.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LibWeb/test-web.cpp')
-rw-r--r--Tests/LibWeb/test-web.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Tests/LibWeb/test-web.cpp b/Tests/LibWeb/test-web.cpp
index 531f009421..893adab262 100644
--- a/Tests/LibWeb/test-web.cpp
+++ b/Tests/LibWeb/test-web.cpp
@@ -40,9 +40,7 @@ TESTJS_MAIN_HOOK()
TESTJS_GLOBAL_FUNCTION(load_local_page, loadLocalPage)
{
- auto name = vm.argument(0).to_string(global_object);
- if (vm.exception())
- return {};
+ auto name = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
// Clear the hooks
before_initial_load_hooks.clear();