I no longer want to be a programmer.

This commit is contained in:
Marks Polakovs 2020-03-25 18:56:36 +01:00
parent af5a86f174
commit e101aa66bb

View file

@ -115,7 +115,11 @@ export function AuxLibrary({ libraryId }: { libraryId: string }) {
useEffect(() => {
async function load() {
const libItems = await loadAuxLibrary(libraryId);
let libItems = await loadAuxLibrary(libraryId);
// Caching is fun huehuehue
if (!(Array.isArray(libItems))) {
libItems = Object.keys(libItems).map(x => (libItems as any)[x]);
}
libItems.forEach(item => {
const id = itemId(item);
if (!(id in AUX_CACHE)) {