From 4eb8b8589bc562e35bb72af52e4f2c92781bc5d3 Mon Sep 17 00:00:00 2001 From: Tim Dykes Date: Tue, 15 Oct 2024 09:25:37 +1100 Subject: [PATCH] changing rescue type on incident causes null entity bug fixed --- src/injectscripts/jobs/edit.js | 2 ++ 1 file changed, 2 insertions(+) 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