[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
}
else{
HypaData.push({
HypaData.unshift({
id: lastId,
hypa: hypaChunks,
supa: supaMemory

View File

@@ -34,7 +34,9 @@ export class AutoStorage{
this.realStorage = new NodeStorage()
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")
const forage = localforage.createInstance({