chiark / gitweb /
script: Builtin per-piece actions properly uniqueness tested
[otter.git] / templates / script.ts
index 454a992184fd795bbf23adfe3d1298b0e125a17d..57b95c7b747c0e73dfa52216b8c8608facc8ada0 100644 (file)
@@ -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) {