Closed KR0WLEY closed 4 years ago
Seems to be due to how I made SearchResults act like an array, it calls the constructor with the wrong arguments.
I'll see how I can work around this without needing to just re-implement every array function.
The error started when I made the filter. const images = i.filter(img => img.data.rating === 'e')
Any progress on this? I found the same issue with the results.map().
With how busy I've been, this issue kinda dropped from my todo list.
I'll try and have a fix out this weekend
Fixed in booru@2.0.4
The workaround itself is somewhat hacky, but should work fine.
Only downside is that calling array methods on SearchResults returns an array of Posts, meaning you lose all the SearchResults methods (although that shouldn't be a problem?)
Code: https://pastr.io/view/1NNYwx Error: https://i.imgur.com/wtCG640.png