FIX: Use getAttribute instead of dataset (#10848)

IE10 does not have dataset field.
This commit is contained in:
Dan Ungureanu 2020-10-07 13:49:19 +03:00 committed by GitHub
parent 120fa8ad2f
commit 9c0892c47c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ var $buo = function() {
var noscriptElements = document.getElementsByTagName("noscript");
// find the element with the "data-path" attribute set
for (var i = 0; i < noscriptElements.length; ++i) {
if (noscriptElements[i].dataset["path"]) {
if (noscriptElements[i].getAttribute("data-path")) {
// noscriptElements[i].innerHTML contains encoded HTML
mainElement.innerHTML = noscriptElements[i].childNodes[0].nodeValue;
break;