Describe the bug
When making a request to the /random endpoint of asmhentai it returns every time (atleast all the times i tried it, maybe it works sometimes) an error
To Reproduce
Make a request to the /random endpoint of asmhentai
Expected behavior
Hentai json return
What happens
I get this error:
Error: TypeError: Cannot read properties of undefined (reading 'replace') at randomAsmhentai (/home/ubuntu/jandapress/build/src/controller/asmhentai/asmhentaiRandom.js:24:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Desktop (please complete the following information):
OS: Ubuntu 22.04
Node version: 18.12.1
Typescript version: 4.6.3
Additional context
The error seems to be cause by the line upload_date: date[1].replace("Added: ", ""), to fast-patch it i put a ternary condition like this: upload_date: date[1] ? date[1].replace("Added: ", "") since i don't really know the structure of the code
Describe the bug When making a request to the /random endpoint of asmhentai it returns every time (atleast all the times i tried it, maybe it works sometimes) an error
To Reproduce Make a request to the /random endpoint of asmhentai
Expected behavior Hentai json return
What happens I get this error:
Error: TypeError: Cannot read properties of undefined (reading 'replace') at randomAsmhentai (/home/ubuntu/jandapress/build/src/controller/asmhentai/asmhentaiRandom.js:24:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Desktop (please complete the following information):
Additional context The error seems to be cause by the line
upload_date: date[1].replace("Added: ", "")
, to fast-patch it i put a ternary condition like this:upload_date: date[1] ? date[1].replace("Added: ", "")
since i don't really know the structure of the code