From faea50c32c80432021fd7a113db5c6ee2385b0cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net>
Date: Wed, 27 Jul 2022 11:32:21 +0200
Subject: [PATCH] uncharacterized bug fix in larvatagger.js

---
 src/backends.jl    | 3 +++
 src/larvatagger.js | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/backends.jl b/src/backends.jl
index 8b66869..1a114d5 100644
--- a/src/backends.jl
+++ b/src/backends.jl
@@ -28,6 +28,9 @@ function Backends(controller, location::String)
     on(model_instances) do models
         model_instance[] = isempty(models) ? nothing : models[1]
     end
+    on(model_instance) do instance
+        @info "Backend selected" backend=active_backend[] instance
+    end
     return Backends(controller, location, backends, active_backend, model_instances, model_instance)
 end
 
diff --git a/src/larvatagger.js b/src/larvatagger.js
index 79eaf6d..ec15b72 100644
--- a/src/larvatagger.js
+++ b/src/larvatagger.js
@@ -117,7 +117,7 @@ const LarvaTagger = (function () {
 		}
 		for (let i = 0; i < selectOptions.length; i++) {
 			const option = document.createElement('option');
-			option.value = String(i);
+			option.value = selectOptions[i];
 			option.text = selectOptions[i];
 			if (jlObserver !== undefined) {
 				option.ondblclick = () => {
-- 
GitLab