Browse Source

prevent uncaught error when data.title is null

pull/585/head
Darren Liew 11 years ago
parent
commit
2f15655dce
  1. 3
      js/push.js

3
js/push.js

@ -458,8 +458,7 @@
} }
data.title = head.querySelector('title'); data.title = head.querySelector('title');
var text = 'innerText' in data.title ? 'innerText' : 'textContent'; data.title = data.title && data.title['innerText' in data.title ? 'innerText' : 'textContent'].trim();
data.title = data.title && data.title[text].trim();
if (options.transition) { if (options.transition) {
data = extendWithDom(data, '.content', body); data = extendWithDom(data, '.content', body);

Loading…
Cancel
Save