I'd like to report what is likely a bug due to IQDB (or rather, probably Gelbooru) rarely returning an [Unrated] without any image dimensions specified, which in turn makes line 186 in api.js fail with a TypeError, as dimensionTexts[1] ends up being undefined.
Edit: I just cross-checked with the code in the repository, it corresponds to line 214 in api.ts.
// dimensionTexts[1] is undefined, therefore .substring() causes a TypeError
const type = dimensionTexts[1].substring(1, dimensionTexts[1].length - 1).toLowerCase()
As seen here, the dimensionTexts aren't in the format WidthXHeight [Type], but just [Type]:
while the code assumes that the result should look like this:
Good morning/afternoon/evening,
I'd like to report what is likely a bug due to IQDB (or rather, probably Gelbooru) rarely returning an
[Unrated]
without any image dimensions specified, which in turn makes line 186 inapi.js
fail with a TypeError, as dimensionTexts[1] ends up beingundefined
.Edit: I just cross-checked with the code in the repository, it corresponds to line 214 in
api.ts
.As seen here, the
dimensionTexts
aren't in the formatWidthXHeight [Type]
, but just[Type]
: while the code assumes that the result should look like this:Amazing library otherwise! Cheers.