mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix(memoize): enumerate food
This commit is contained in:
@@ -541,13 +541,11 @@ function buildFood () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const memoizedBuildFood = memoize(buildFood);
|
const memoizedBuildFood = memoize(buildFood);
|
||||||
|
|
||||||
Object.defineProperty(api, 'food', {
|
Object.defineProperty(api, 'food', {
|
||||||
get () { return memoizedBuildFood(); },
|
get () { return memoizedBuildFood(); },
|
||||||
|
enumerable: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
api.appearances = appearances;
|
api.appearances = appearances;
|
||||||
|
|
||||||
api.backgrounds = backgroundsTree();
|
api.backgrounds = backgroundsTree();
|
||||||
api.backgroundsFlat = backgroundsFlat();
|
api.backgroundsFlat = backgroundsFlat();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user