diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-05-24 20:05:22 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-05-24 20:05:27 +0300 |
| commit | 05f4954a99d04f9e4ef70f138db58488b21c2e5a (patch) | |
| tree | ccf17056de6a01aaf57b107231b4bd235355641a /src | |
| parent | 15e0ac44ca7f6fc6c7c7ebd7fe521e13f572669d (diff) | |
| download | the-epube-05f4954a99d04f9e4ef70f138db58488b21c2e5a.tar.gz the-epube-05f4954a99d04f9e4ef70f138db58488b21c2e5a.tar.xz | |
fix for TS2532 assuming undefined if element is missing
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app.js b/src/app.js index 6c108a9..5c1ba4f 100644 --- a/src/app.js +++ b/src/app.js @@ -415,8 +415,8 @@ class AppClass extends AppCommon { if (confirm("Download all books on this page?")) { $(".row > div").each((i, row) => { - const bookId = $(row).attr("id").replace("cell-", ""); - const dropitem = $(row).find(".offline_dropitem")[0]; + const bookId = ($(row).attr("id") ?? "").replace("cell-", ""); + const dropitem = $(row).find(".offline_dropitem")[0] ?? null; if (bookId) { const cacheId = 'epube-book.' + bookId; |
