From 10fa0fda630c08f2e7959bcb9953cd7b40acd766 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Wed, 25 Nov 2020 18:45:56 +0330 Subject: [PATCH] fix(canonical): remove unnecessary check of origin close #181 --- lib/amp/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/amp/plugin.js b/lib/amp/plugin.js index 70b80fad..e6e93034 100644 --- a/lib/amp/plugin.js +++ b/lib/amp/plugin.js @@ -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