[fix] fixed object loading as map

This commit is contained in:
kwaroran
2023-06-24 01:36:17 +09:00
parent 393ea8239b
commit 491fb676c5
3 changed files with 5 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ export let appVer = '1.27.2'
export let webAppSubVer = ''
export function setDatabase(data:Database){
console.log(data)
if(checkNullish(data.characters)){
data.characters = []
}

View File

@@ -199,7 +199,7 @@ export async function saveDb(){
let changed = false
syncDrive()
DataBase.subscribe(() => {
changed = true
changed = false
})
while(true){
if(changed){

View File

@@ -3,12 +3,12 @@ import pako from "pako";
import { isTauri } from "./globalApi";
const packr = new Packr({
useRecords:true
useRecords:false
});
const unpackr = new Unpackr({
int64AsType: 'number',
useRecords:true
useRecords:false
})
const magicHeader = new Uint8Array([0, 82, 73, 83, 85, 83, 65, 86, 69, 0, 7]);
@@ -45,6 +45,7 @@ export function decodeRisuSave(data:Uint8Array){
}
catch (error) {
try {
console.log('risudecode')
const risuSaveHeader = new Uint8Array(Buffer.from("\u0000\u0000RISU",'utf-8'))
const realData = data.subarray(risuSaveHeader.length)
const dec = unpackr.decode(realData)