diff options
Diffstat (limited to 'Userland/Applications/Spreadsheet/JSIntegration.cpp')
-rw-r--r-- | Userland/Applications/Spreadsheet/JSIntegration.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.cpp b/Userland/Applications/Spreadsheet/JSIntegration.cpp index 578cb9b8b3..463973d8e9 100644 --- a/Userland/Applications/Spreadsheet/JSIntegration.cpp +++ b/Userland/Applications/Spreadsheet/JSIntegration.cpp @@ -425,9 +425,7 @@ JS_DEFINE_NATIVE_FUNCTION(WorkbookObject::sheet) return JS::Value(&sheet.global_object()); } } else { - auto index = name_value.to_length(global_object); - if (vm.exception()) - return {}; + auto index = TRY_OR_DISCARD(name_value.to_length(global_object)); if (index < workbook.sheets().size()) return JS::Value(&workbook.sheets()[index].global_object()); } |