sort mappings
This commit is contained in:
parent
0eb07b8de5
commit
b1741f2b87
@ -61,7 +61,7 @@ function addMapping(key, directory) {
|
|||||||
let mappings = new Map(JSON.parse(localStorage.getItem('mappings')) || []);
|
let mappings = new Map(JSON.parse(localStorage.getItem('mappings')) || []);
|
||||||
statusLine.innerHTML = (mappings.has(key) ? "Changed" : "Added") + ` mapping '${key}' - '${directory}'`;
|
statusLine.innerHTML = (mappings.has(key) ? "Changed" : "Added") + ` mapping '${key}' - '${directory}'`;
|
||||||
mappings.set(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();
|
renderMappings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user