Skip to content

Commit

Permalink
fix(link): working href with router-link on ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Sep 21, 2017
1 parent ec36379 commit 8a6f243
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/components/link.js
Expand Up @@ -197,6 +197,11 @@ export default {
props: assign(props, { tag: props.routerTag })
});

// If href prop exists on router-link (even undefined or null) it fails working on SSR
if (!componentData.attrs.href) {
delete componentData.attrs.href
}

// We want to overwrite any click handler since our callback
// will invoke the supplied handler if !props.disabled
componentData[eventType] = assign(componentData[eventType] || {}, handlers);
Expand Down

0 comments on commit 8a6f243

Please sign in to comment.