riot/route

Bug in support of 'target' attribute

geonanorch opened this issue · 3 comments

Just found a small bug in v5.3.2, which results in 'target' attributes being ignored. In:

const isForbiddenLink = el => !el || !isLinkNode(el) // not A tag
|| has(el, DOWNLOAD_LINK_ATTRIBUTE) // has download attr
|| !has(el, HREF_LINK_ATTRIBUTE) // has no href attr
|| isTargetSelfLink(el.target) || isCrossOriginLink(el.href);

the call isTargetSelfLink(el.target) should read isTargetSelfLink(el)

@geonanorch thank you. Can you please open a PR for it?

Sure, though threre is really not much to it, more like a typo. PR#150.

thank you. It's fixed in @riotjs/route@5.3.3