fix: Uncaught SyntaxError: Illegal return statement