Permalink
Browse files

fix(link): working href with router-link on ssr

  • Loading branch information...
pi0 committed Sep 21, 2017
1 parent ec36379 commit 8a6f243f4174587888c65c360678a1fd9e74a2e9
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/components/link.js
@@ -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);

0 comments on commit 8a6f243

Please sign in to comment.