mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
fix: sort multi keys
This commit is contained in:
@@ -2,6 +2,7 @@ import localforage from "localforage";
|
||||
import { extendPrototype } from "localforage-getitems";
|
||||
import { encode, decode } from "../utils/base64";
|
||||
import { hexToBuffer, bufferToHex } from "../utils/hex";
|
||||
import sort from "fast-sort";
|
||||
const encoder = new TextEncoder();
|
||||
const decoder = new TextDecoder();
|
||||
|
||||
@@ -18,7 +19,7 @@ function read(key) {
|
||||
|
||||
function readMulti(keys) {
|
||||
if (keys.length <= 0) return {};
|
||||
return localforage.getItems(keys);
|
||||
return localforage.getItems(sort(keys).asc());
|
||||
}
|
||||
|
||||
function write(key, data) {
|
||||
|
||||
@@ -6883,7 +6883,7 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
|
||||
|
||||
"notes-core@https://github.com/thecodrr/notes-core.git":
|
||||
version "1.2.0"
|
||||
resolved "https://github.com/thecodrr/notes-core.git#479f290b1b8c929eba45e27b1a8293f1a221de8a"
|
||||
resolved "https://github.com/thecodrr/notes-core.git#c5f5a15cba00e0d56aa99fac19277b1ce3cd0454"
|
||||
dependencies:
|
||||
fast-sort "^2.0.1"
|
||||
fuzzysearch "^1.0.3"
|
||||
|
||||
Reference in New Issue
Block a user