Protect against no element with id=favicon

This commit is contained in:
Thomas Kluyver 2017-07-26 12:59:25 +01:00
parent 0bd5fe8759
commit 5faa2ab9b5

View File

@ -1103,7 +1103,7 @@ define([
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = utils.url_path_join(utils.get_body_data('baseUrl'), src);
if (link.href === oldLink.href) {
if (oldLink && (link.href === oldLink.href)) {
// This favicon is already set, don't modify the DOM.
return;
}