modularload
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -361,3 +361,4 @@ 'use strict'; | ||
var title = this.data.getElementsByTagName('title')[0]; | ||
var description = this.data.head.querySelector('meta[name="description"]'); | ||
var newDesc = this.data.head.querySelector('meta[name="description"]'); | ||
var oldDesc = document.head.querySelector('meta[name="description"]'); | ||
var container; | ||
@@ -376,3 +377,3 @@ var newContainer; | ||
if (title) document.title = title.innerHTML; | ||
if (description) document.head.querySelector('meta[name="description"]').setAttribute('content', description.getAttribute('content')); | ||
if (oldDesc && newDesc) oldDesc.setAttribute('content', newDesc.getAttribute('content')); | ||
@@ -379,0 +380,0 @@ if (datas) { |
@@ -359,3 +359,4 @@ function _classCallCheck(instance, Constructor) { | ||
var title = this.data.getElementsByTagName('title')[0]; | ||
var description = this.data.head.querySelector('meta[name="description"]'); | ||
var newDesc = this.data.head.querySelector('meta[name="description"]'); | ||
var oldDesc = document.head.querySelector('meta[name="description"]'); | ||
var container; | ||
@@ -374,3 +375,3 @@ var newContainer; | ||
if (title) document.title = title.innerHTML; | ||
if (description) document.head.querySelector('meta[name="description"]').setAttribute('content', description.getAttribute('content')); | ||
if (oldDesc && newDesc) oldDesc.setAttribute('content', newDesc.getAttribute('content')); | ||
@@ -377,0 +378,0 @@ if (datas) { |
{ | ||
"name": "modularload", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Dead simple page transitions and lazy loading.", | ||
@@ -5,0 +5,0 @@ "repository": "modularorg/modularload", |
@@ -273,3 +273,4 @@ export default class { | ||
const title = this.data.getElementsByTagName('title')[0]; | ||
const description = this.data.head.querySelector('meta[name="description"]'); | ||
const newDesc = this.data.head.querySelector('meta[name="description"]'); | ||
const oldDesc = document.head.querySelector('meta[name="description"]'); | ||
let container; | ||
@@ -289,3 +290,3 @@ let newContainer; | ||
if (title) document.title = title.innerHTML; | ||
if (description) document.head.querySelector('meta[name="description"]').setAttribute('content', description.getAttribute('content')); | ||
if (oldDesc && newDesc) oldDesc.setAttribute('content', newDesc.getAttribute('content')); | ||
if (datas) { | ||
@@ -292,0 +293,0 @@ Object.entries(datas).forEach(([key, val]) => { |
46748
1170