Map editor tiles are now fully loaded from cache
This commit is contained in:
@ -33,6 +33,16 @@ export class BaseStorage<T extends { id: string }> {
|
||||
}
|
||||
}
|
||||
|
||||
async getByIds(ids: string[]): Promise<T[]> {
|
||||
try {
|
||||
const items = await this.dexie.table(this.tableName).bulkGet(ids)
|
||||
return items.filter((item) => item !== null)
|
||||
} catch (error) {
|
||||
console.error(`Failed to retrieve ${this.tableName} by ids:`, error)
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
async getAll(): Promise<T[]> {
|
||||
try {
|
||||
return await this.dexie.table(this.tableName).toArray()
|
||||
|
Reference in New Issue
Block a user