Fix crash on user lists page from orphaned hangers
If you delete a closet list without deleting the items in it, it'll dump them into your default own/want lists. This isn't necessarily the behavior we really want, but oh well, that's the truth right now! The GraphQL endpoint was assuming that all hanger `list_id` values were valid, oops! Now, we ignore list IDs that don't match a list.
This commit is contained in:
parent
53deee85dd
commit
a2594d1797
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ const resolvers = {
|
|||
const defaultListOwnedHangers = [];
|
||||
const defaultListWantedHangers = [];
|
||||
for (const hanger of allClosetHangers) {
|
||||
if (hanger.listId) {
|
||||
if (hanger.listId && hangersByList.has(hanger.listId)) {
|
||||
hangersByList.get(hanger.listId).push(hanger);
|
||||
} else if (hanger.owned) {
|
||||
defaultListOwnedHangers.push(hanger);
|
||||
|
|
Loading…
Reference in a new issue