Skip to content

Commit

Permalink
fix: Powered-by component is not SSR compatible algolia/vue-instantse…
Browse files Browse the repository at this point in the history
…arch#367

Add a null check to the `location` reference in `algoliaUrl`.

fixes algolia/vue-instantsearch#367
  • Loading branch information
A Jordan Simonds committed Dec 4, 2017
1 parent cf1dc39 commit 32a2c2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-instantsearch/src/components/PoweredBy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
'https://www.algolia.com/?' +
'utm_source=vue-instantsearch&' +
'utm_medium=website&' +
`utm_content=${location.hostname}&` +
( location ? `utm_content=${location.hostname}&` : '' ) +
'utm_campaign=poweredby'
);
},
Expand Down

0 comments on commit 32a2c2a

Please sign in to comment.