Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return statement causes error in onclick #631

Closed
khusika opened this issue Oct 31, 2023 · 2 comments
Closed

return statement causes error in onclick #631

khusika opened this issue Oct 31, 2023 · 2 comments

Comments

@khusika
Copy link

khusika commented Oct 31, 2023

Similar to #623

log

ERROR failed to process "/about/index.html": "/tmp/hugo-transform-error3911012004:58:350": unexpected return in expression on line 58 and column 350
    1: return false;
       ^

code
<a href="[#](http://localhost:1313/about/#)" onclick="return false;" class="menu-item theme-switch" title="Switch Theme">

@khusika khusika changed the title return statement causes error in html return statement causes error in onclick Oct 31, 2023
@khusika
Copy link
Author

khusika commented Oct 31, 2023

I've tried changing onclick="return false;" to onclick="return!1" and gave the same error

ERROR failed to process "/tags/daily/index.html": "/tmp/hugo-transform-error148739838:41:343": unexpected return in expression on line 41 and column 343
    1: return!1
       ^

@tdewolff
Copy link
Owner

Thanks, should be fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants