diff --git a/Tests/LibWeb/Text/expected/canvas/basic.txt b/Tests/LibWeb/Text/expected/canvas/basic.txt
new file mode 100644
index 0000000000..07cc20e4ac
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/canvas/basic.txt
@@ -0,0 +1,2 @@
+normal normal 20px SerenitySans
+normal normal 20px SerenitySans
diff --git a/Tests/LibWeb/Text/input/canvas/basic.html b/Tests/LibWeb/Text/input/canvas/basic.html
new file mode 100644
index 0000000000..8eeb3fe0c1
--- /dev/null
+++ b/Tests/LibWeb/Text/input/canvas/basic.html
@@ -0,0 +1,11 @@
+
+
diff --git a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasTextDrawingStyles.h b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasTextDrawingStyles.h
index b6f662cd7b..36836292bc 100644
--- a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasTextDrawingStyles.h
+++ b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasTextDrawingStyles.h
@@ -45,7 +45,7 @@ public:
auto font_style_value_result = parse_css_value(parsing_context, font, CSS::PropertyID::Font);
// If the new value is syntactically incorrect (including using property-independent style sheet syntax like 'inherit' or 'initial'), then it must be ignored, without assigning a new font value.
- if (font_style_value_result.is_error()) {
+ if (font_style_value_result.is_error() || !font_style_value_result.value()) {
return;
}
my_drawing_state().font_style_value = font_style_value_result.value();