HTML Audio CurrentTime Not Working

Problem description

I have a music player on my website, and I have a feature where the user clicks on a custom progress bar to change the time of the song. The problem is that when the progress bar is clicked, the song’s current time is set to 0. I tested the same code on VS and it works fine.

Expected behavior

song skips to proper time when progress bar clicked

Actual behavior

song time goes to 0 when progress bar clicked

Steps to reproduce

Not sure how to reproduce, here is link to repl instead: https://replit.com/@SevenT33N/SevenT33NMusic?v=1

Browser

Chrome

OS

Windows 10

Device if mobile

N/A

Plan

Free