diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-17 23:33:35 +0300 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-18 08:01:38 +0300 |
commit | f6a5ff7b003930a1994c0f4c4a1c4b1da7c7123d (patch) | |
tree | 0a7cce77a5d3f9f81444ffb22047b4944e8be28d /Userland/Applications | |
parent | 20d990563cf858d51d4c6bf93a7c37317c5ecd12 (diff) | |
download | serenity-f6a5ff7b003930a1994c0f4c4a1c4b1da7c7123d.zip |
LibJS: Convert to_i32() to ThrowCompletionOr
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/Spreadsheet/CellType/Date.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/Spreadsheet/CellType/Date.cpp b/Userland/Applications/Spreadsheet/CellType/Date.cpp index 5881c2030f..9c257dab65 100644 --- a/Userland/Applications/Spreadsheet/CellType/Date.cpp +++ b/Userland/Applications/Spreadsheet/CellType/Date.cpp @@ -30,7 +30,7 @@ String DateCell::display(Cell& cell, const CellTypeMetadata& metadata) const } } }; auto timestamp = js_value(cell, metadata); - auto string = Core::DateTime::from_timestamp(timestamp.to_i32(cell.sheet().global_object())).to_string(metadata.format.is_empty() ? "%Y-%m-%d %H:%M:%S" : metadata.format.characters()); + auto string = Core::DateTime::from_timestamp(TRY_OR_DISCARD(timestamp.to_i32(cell.sheet().global_object()))).to_string(metadata.format.is_empty() ? "%Y-%m-%d %H:%M:%S" : metadata.format.characters()); if (metadata.length >= 0) return string.substring(0, metadata.length); |