summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r--Userland/Applications/Spreadsheet/CellType/Date.cpp2
-rw-r--r--Userland/Applications/Spreadsheet/CellType/Numeric.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Spreadsheet/CellType/Date.cpp b/Userland/Applications/Spreadsheet/CellType/Date.cpp
index edc343b33e..5881c2030f 100644
--- a/Userland/Applications/Spreadsheet/CellType/Date.cpp
+++ b/Userland/Applications/Spreadsheet/CellType/Date.cpp
@@ -41,7 +41,7 @@ String DateCell::display(Cell& cell, const CellTypeMetadata& metadata) const
JS::Value DateCell::js_value(Cell& cell, const CellTypeMetadata&) const
{
auto js_data = cell.js_data();
- auto value = js_data.to_double(cell.sheet().global_object());
+ auto value = TRY_OR_DISCARD(js_data.to_double(cell.sheet().global_object()));
return JS::Value(value / 1000); // Turn it to seconds
}
diff --git a/Userland/Applications/Spreadsheet/CellType/Numeric.cpp b/Userland/Applications/Spreadsheet/CellType/Numeric.cpp
index 5d9a1b0112..4b526786d0 100644
--- a/Userland/Applications/Spreadsheet/CellType/Numeric.cpp
+++ b/Userland/Applications/Spreadsheet/CellType/Numeric.cpp
@@ -34,7 +34,7 @@ String NumericCell::display(Cell& cell, const CellTypeMetadata& metadata) const
if (metadata.format.is_empty())
string = value.to_string_without_side_effects();
else
- string = format_double(metadata.format.characters(), value.to_double(cell.sheet().global_object()));
+ string = format_double(metadata.format.characters(), TRY_OR_DISCARD(value.to_double(cell.sheet().global_object())));
if (metadata.length >= 0)
return string.substring(0, metadata.length);