Skip to content

Commit

Permalink
fix(canonical): remove unnecessary check of origin
Browse files Browse the repository at this point in the history
close  #181
  • Loading branch information
farnabaz committed Nov 25, 2020
1 parent 2f36e39 commit 10fa0fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/amp/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const createCustomHead = originalHead => function customHead () {
* Add canonical meta and AMP requirement if page is served as AMP
*/
if (this.$isAMP) {
if (origin && !head.link.find(l => l.rel === 'canonical' || l.hid === 'canonical')) {
if (!head.link.find(l => l.rel === 'canonical' || l.hid === 'canonical')) {
const path = this.$isAMP && this.$ampMode !== 'only'
? this.$route.fullPath.replace(/^\/amp(\/.*)?/, '$1')
: this.$route.fullPath
Expand Down

0 comments on commit 10fa0fd

Please # to comment.