diff --git a/js/push.js b/js/push.js index abf7201..cb0b92a 100644 --- a/js/push.js +++ b/js/push.js @@ -458,8 +458,7 @@ } data.title = head.querySelector('title'); - var text = 'innerText' in data.title ? 'innerText' : 'textContent'; - data.title = data.title && data.title[text].trim(); + data.title = data.title && data.title['innerText' in data.title ? 'innerText' : 'textContent'].trim(); if (options.transition) { data = extendWithDom(data, '.content', body);