How can I avoid recursion in this JavaScript function that uses Promises?

How can I avoid recursion in this JavaScript function that uses Promises?

|
Cargando...

SSS TikTok Downloader

Siguiente Video