add checks (#3029)

This commit is contained in:
David Holdeman 2021-07-22 08:00:27 -05:00 committed by GitHub
parent c481f161d5
commit fef828efbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -138,9 +138,11 @@ window.addEventListener('load', function() {
hideEmptyColumns(sdiv.querySelector('.pinout-table'));
}.bind(null, connector, sdiv, img));
img.src = connector.info.image.file;
if (document.title.length == 0) {
if (document.title.length == 0 && typeof(connector.info.title) != "undefined") {
document.title = connector.info.title;
}
sdiv.querySelector(".connector-name").innerText = connector.info.name;
if (typeof(connector.info.name) != "undefined") {
sdiv.querySelector(".connector-name").innerText = connector.info.name;
}
}
});