AtoraSuunva / booru

Searches boorus for images using some js magic
https://www.npmjs.com/package/booru
MIT License
80 stars 19 forks source link

data.tags.split fix #88

Closed youliao closed 2 years ago

youliao commented 2 years ago

Tags is empty string:

https://konachan.com/post.json?tags=id:38805

Example: const results = await Booru.search("konac", "id:38805");

Then throw error:

TypeError: Cannot read properties of undefined (reading 'split') at getTags (/usr/src/node_modules/booru/dist/structures/Post.js:1:900) at new Post (/usr/src/node_modules/booru/dist/structures/Post.js:1:2165) at /usr/src/node_modules/booru/dist/boorus/Booru.js:1:2633 at Array.map () at Booru.parseSearchResult (/usr/src/node_modules/booru/dist/boorus/Booru.js:1:2625) at Booru.search (/usr/src/node_modules/booru/dist/boorus/Booru.js:1:927) at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5)...