[fix] order loading error
This commit is contained in:
@@ -635,8 +635,7 @@ export function checkCharOrder() {
|
||||
let ordered = cloneDeep(db.characterOrder ?? [])
|
||||
for(let i=0;i<db.characterOrder.length;i++){
|
||||
const folder =db.characterOrder[i]
|
||||
if(typeof(folder) !== 'string'){
|
||||
console.log(folder)
|
||||
if(typeof(folder) !== 'string' && folder){
|
||||
for(const f of folder.data){
|
||||
ordered.push(f)
|
||||
}
|
||||
@@ -657,6 +656,11 @@ export function checkCharOrder() {
|
||||
for(let i=0;i<db.characterOrder.length;i++){
|
||||
const data =db.characterOrder[i]
|
||||
if(typeof(data) !== 'string'){
|
||||
if(!data){
|
||||
db.characterOrder.splice(i,1)
|
||||
i--;
|
||||
continue
|
||||
}
|
||||
if(data.data.length === 0){
|
||||
db.characterOrder.splice(i,1)
|
||||
i--;
|
||||
|
||||
Reference in New Issue
Block a user