Comparing version 0.1.32 to 0.1.33
@@ -87,4 +87,5 @@ 'use strict'; | ||
} | ||
if ((0, _getObjectValue2.default)(params, ['data', 'canonical'])) { | ||
this.updateCanonicalUrl((0, _getObjectValue2.default)(params, ['data', 'canonical'])); | ||
var canonical = (0, _getObjectValue2.default)(params, ['data', 'canonical']); | ||
if (canonical) { | ||
this.updateCanonicalUrl(canonical); | ||
} | ||
@@ -96,2 +97,8 @@ } | ||
value: function updateCanonicalUrl(url) { | ||
var lStore = (0, _getObjectValue2.default)(window, ['localStorage']); | ||
if (lStore) { | ||
if (lStore.getItem('no-canonical')) { | ||
return; | ||
} | ||
} | ||
var newUrl = url + document.location.search; | ||
@@ -109,3 +116,10 @@ if (-1 !== url.indexOf(document.location.hostname)) { | ||
if (canonical && canonical.href) { | ||
this.updateCanonicalUrl(canonical.href); | ||
if (-1 !== document.URL.indexOf('--no-canonical')) { | ||
var lStore = (0, _getObjectValue2.default)(window, ['localStorage']); | ||
if (lStore) { | ||
lStore.setItem('no-canonical', 1); | ||
} | ||
} else { | ||
this.updateCanonicalUrl(canonical.href); | ||
} | ||
} | ||
@@ -112,0 +126,0 @@ } |
{ | ||
"name": "reshow", | ||
"version": "0.1.32", | ||
"version": "0.1.33", | ||
"description": "Flux Reducer Present Library", | ||
@@ -5,0 +5,0 @@ "main": "./build/src/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
616
35069
11
6
0