[fix] hypamemory save order

This commit is contained in:
kwaroran
2023-06-29 07:38:28 +09:00
parent d52f79191d
commit 0bcf6336b9
2 changed files with 4 additions and 2 deletions

View File

@@ -332,7 +332,7 @@ export async function supaMemory(
HypaData[0].supa = supaMemory HypaData[0].supa = supaMemory
} }
else{ else{
HypaData.push({ HypaData.unshift({
id: lastId, id: lastId,
hypa: hypaChunks, hypa: hypaChunks,
supa: supaMemory supa: supaMemory

View File

@@ -34,7 +34,9 @@ export class AutoStorage{
this.realStorage = new NodeStorage() this.realStorage = new NodeStorage()
return return
} }
else if(window.navigator?.storage?.getDirectory && localStorage.getItem('opfs_flag!') === "able"){ else if(window.navigator?.storage?.getDirectory &&
FileSystemFileHandle?.prototype?.createWritable &&
localStorage.getItem('opfs_flag!') === "able"){
console.log("using opfs storage") console.log("using opfs storage")
const forage = localforage.createInstance({ const forage = localforage.createInstance({