From b1741f2b8742c9c2a4b55b08415601c23d7a7232 Mon Sep 17 00:00:00 2001 From: "matth@ultra" Date: Wed, 4 Sep 2024 12:06:53 +0200 Subject: [PATCH] sort mappings --- src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index ff16aea..6d7d7f2 100644 --- a/src/config.js +++ b/src/config.js @@ -61,7 +61,7 @@ function addMapping(key, directory) { let mappings = new Map(JSON.parse(localStorage.getItem('mappings')) || []); statusLine.innerHTML = (mappings.has(key) ? "Changed" : "Added") + ` mapping '${key}' - '${directory}'`; mappings.set(key, directory); - localStorage.setItem('mappings', JSON.stringify(Array.from(mappings.entries()))); + localStorage.setItem('mappings', JSON.stringify(Array.from(mappings.entries()).sort())); renderMappings(); }