Commit 17def4f0 authored by Sven Franck's avatar Sven Franck

app: fixed error setting page title based on non-existing header

parent c8641359
......@@ -3241,13 +3241,12 @@
$.i18n.setLng(new_language, function () {
map.actions.translateNodeList(document);
// also translate page header
lookup = util.getHeader()
.getElementsByTagName("H1")[0]
.getAttribute("data-i18n");
// also translate page header, if there is one
lookup = util.getHeader().getElementsByTagName("H1")[0];
if (lookup) {
document.title = map.actions.translateLookup(lookup);
document.title =
map.actions.translateLookup(lookup.getAttribute("data-i18n"));
}
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment