Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Type error in runtime.js::handle_click for <a> without href #235

Closed
samhatchett opened this issue Apr 13, 2018 · 2 comments · Fixed by #411
Closed

Type error in runtime.js::handle_click for <a> without href #235

samhatchett opened this issue Apr 13, 2018 · 2 comments · Fixed by #411
Labels

Comments

@samhatchett
Copy link
Contributor

if no href is set in the client html - as in,

<a role="button" on:click="do_something()">click</a>

this results in a type error in runtime.js - because href will be null here:

const href = String(svg ? (<SVGAElement>a).href.baseVal : a.href);

@silentworks
Copy link
Contributor

You probably want to use an <button> instead, seen as you are defining the role as a button.

@Rich-Harris
Copy link
Member

Fixed in 0.19.2

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

Successfully merging a pull request may close this issue.

3 participants