I no longer want to be a programmer.
This commit is contained in:
parent
af5a86f174
commit
e101aa66bb
1 changed files with 5 additions and 1 deletions
|
@ -115,7 +115,11 @@ export function AuxLibrary({ libraryId }: { libraryId: string }) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function load() {
|
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 => {
|
libItems.forEach(item => {
|
||||||
const id = itemId(item);
|
const id = itemId(item);
|
||||||
if (!(id in AUX_CACHE)) {
|
if (!(id in AUX_CACHE)) {
|
||||||
|
|
Loading…
Reference in a new issue