added some checks on sync and some error handling for bad site assignment info

This commit is contained in:
Kendall Werts
2020-01-09 16:36:26 -06:00
parent 9de6df6157
commit 5ae7a395a1
4 changed files with 285 additions and 163 deletions
+6 -2
View File
@@ -724,8 +724,12 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
however it allows us to have a tabindex before the first selected item
*/
const focusHandler = () => {
list.querySelector("tr .clickable").focus();
document.removeEventListener("focus", focusHandler);
const identityList = list.querySelector("tr .clickable");
if (identityList) {
// otherwise this throws an error when there are no containers present.
identityList.focus();
document.removeEventListener("focus", focusHandler);
}
};
document.addEventListener("focus", focusHandler);
/* If the user mousedown's first then remove the focus handler */