mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-29 12:06:01 +02:00
Fix example
This commit is contained in:
@@ -7,9 +7,14 @@
|
||||
let key;
|
||||
let value;
|
||||
|
||||
let store = new LazyStore("cache.json", { serializeFnName: "pretty-json" });
|
||||
let store;
|
||||
let cache = {};
|
||||
|
||||
function newStore() {
|
||||
store = new LazyStore("cache.json", { serializeFnName: "pretty-json" });
|
||||
}
|
||||
newStore()
|
||||
|
||||
async function refreshEntries() {
|
||||
try {
|
||||
const values = await store.entries();
|
||||
@@ -55,7 +60,7 @@
|
||||
}
|
||||
|
||||
function reopen() {
|
||||
store = new LazyStore("cache.json");
|
||||
newStore()
|
||||
onMessage("We made a new `LazyStore` instance, operations will now work");
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user