From bd3ffcdabb42f097bfb008ef1c02cfa8708e7a72 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sun, 13 Oct 2024 14:41:36 +1300 Subject: [PATCH] LibWeb: Simplify populate_session_history_entry_document conditional --- Userland/Libraries/LibWeb/HTML/Navigable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/Navigable.cpp b/Userland/Libraries/LibWeb/HTML/Navigable.cpp index 4bd2e6337aa..07af38d5bb6 100644 --- a/Userland/Libraries/LibWeb/HTML/Navigable.cpp +++ b/Userland/Libraries/LibWeb/HTML/Navigable.cpp @@ -1178,7 +1178,7 @@ WebIDL::ExceptionOr Navigable::populate_session_history_entry_document( // header specifying the attachment disposition type, then: // 6. Otherwise, if navigationParams's response's status is not 204 and is not 205, then set entry's document state's document to the result of // loading a document given navigationParams, sourceSnapshotParams, and entry's document state's initiator origin. - else if (navigation_params.get>()->response->status() != 204 && navigation_params.get>()->response->status() != 205) { + else if (auto const& response = navigation_params.get>()->response; response->status() != 204 && response->status() != 205) { auto document = load_document(navigation_params.get>()); entry->document_state()->set_document(document); }