diff --git a/src/injectscripts/jobs/edit.js b/src/injectscripts/jobs/edit.js index 24d158a..a040da4 100644 --- a/src/injectscripts/jobs/edit.js +++ b/src/injectscripts/jobs/edit.js @@ -257,6 +257,8 @@ function tableToObj(table) { function UpdateAssignedToBoxesActive() { + if (vm.entityAssignedTo.peek() != null) { $(`#nearest-rescue-lhq-text a[data-unit!='${vm.entityAssignedTo.peek().Code}'], #nearest-lhq-text a[data-unit!='${vm.entityAssignedTo.peek().Code}'] `).removeClass('active') $(`#nearest-rescue-lhq-text a[data-unit='${vm.entityAssignedTo.peek().Code}'], #nearest-lhq-text a[data-unit='${vm.entityAssignedTo.peek().Code}']`).addClass('active') + } } \ No newline at end of file