summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Document.cpp')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index 0a26a2f214..2cfa9a55c2 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -134,7 +134,7 @@ Origin Document::origin() const
{
if (!m_url.is_valid())
return {};
- return { m_url.protocol(), m_url.host(), m_url.port() };
+ return { m_url.protocol(), m_url.host(), m_url.port_or_default() };
}
void Document::set_origin(const Origin& origin)