From 99af52651d00c9264dc2a4ae0c04da0e8d779943 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 26 Jun 2022 02:28:46 +0100 Subject: [PATCH] script: Builtin per-piece actions properly uniqueness tested Signed-off-by: Ian Jackson --- templates/script.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/script.ts b/templates/script.ts index 454a9921..57b95c7b 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -348,9 +348,9 @@ function recompute_keybindings() { } all_targets.sort(pieceid_z_cmp); let add_uo = function(targets: PieceId[] | null, uo: UoDescription) { - uo_map[uo.def_key] = { - targets: targets, - ...uo + let currently = prep_add_uo(uo); + if (currently) { + currently.targets = targets; }; }; if (all_targets.length) { -- 2.30.2