summaryrefslogtreecommitdiff
path: root/Userland/df.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/df.cpp')
-rw-r--r--Userland/df.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/df.cpp b/Userland/df.cpp
index 9cf1def128..a8a6595867 100644
--- a/Userland/df.cpp
+++ b/Userland/df.cpp
@@ -86,7 +86,9 @@ int main(int argc, char** argv)
}
auto file_contents = file->read_all();
- auto json = JsonValue::from_string(file_contents).as_array();
+ auto json_result = JsonValue::from_string(file_contents);
+ ASSERT(json_result.has_value());
+ auto json = json_result.value().as_array();
json.for_each([](auto& value) {
auto fs_object = value.as_object();
auto fs = fs_object.get("class_name").to_string();