Révision | c72364b7ec2b10e780c384c0e01dee8430394844 (tree) |
---|---|
l'heure | 2017-08-15 10:32:05 |
Auteur | umorigu <umorigu@gmai...> |
Commiter | umorigu |
BugTrack/2420 Avoid JavaScript error on PHP5.3 env
@@ -64,6 +64,9 @@ if (window.addEventListener) { | ||
64 | 64 | function getSiteListFromBody() { |
65 | 65 | var list = []; |
66 | 66 | var defRoot = document.querySelector('.pukiwiki-ticketlink-def'); |
67 | + if (!defRoot) { | |
68 | + return []; | |
69 | + } | |
67 | 70 | var siteNodes = defRoot.querySelectorAll('.pukiwiki-ticketlink-site'); |
68 | 71 | Array.prototype.forEach.call(siteNodes, function (e) { |
69 | 72 | var siteInfoText = e.dataset && e.dataset.site; |