diff options
Diffstat (limited to 'Userland/Libraries/LibTest/JavaScriptTestRunner.h')
-rw-r--r-- | Userland/Libraries/LibTest/JavaScriptTestRunner.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunner.h b/Userland/Libraries/LibTest/JavaScriptTestRunner.h index 7993a97841..3641559c25 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunner.h +++ b/Userland/Libraries/LibTest/JavaScriptTestRunner.h @@ -241,7 +241,7 @@ inline Optional<JsonValue> get_test_results(JS::Interpreter& interpreter) auto json_string = TRY_OR_DISCARD(JS::JSONObject::stringify_impl(interpreter.global_object(), results, JS::js_undefined(), JS::js_undefined())); auto json = JsonValue::from_string(json_string); - if (!json.has_value()) + if (json.is_error()) return {}; return json.value(); |