Fix crash when using old tab to load item page
Oops, the new `canonicalAppearance` arguments couldn't handle being omitted rather than being null, due to a low-level SQL call site that cares about the difference. This meant that loading an item page in an old tab, with an old copy of our JS, could cause a crash. Now, the backend will be okay with queries from old pages, and respond the same as before! This isn't a huge deal, because once everyone is on the new JS we won't send queries without this parameter anyway… but I like my optional arguments to actually BE optional, without surprises lurking >.>
This commit is contained in:
parent
8970b6af26
commit
f3e19158d0
1 changed files with 6 additions and 1 deletions
|
@ -1005,7 +1005,12 @@ const buildCanonicalPetStateForBodyLoader = (db, loaders) =>
|
|||
LIMIT 1`,
|
||||
nestTables: true,
|
||||
},
|
||||
[bodyId, preferredColorId, fallbackColorId, gender === "fem"]
|
||||
[
|
||||
bodyId,
|
||||
preferredColorId || "<ignore>",
|
||||
fallbackColorId,
|
||||
gender === "fem",
|
||||
]
|
||||
);
|
||||
const petState = normalizeRow(rows[0].pet_states);
|
||||
const petType = normalizeRow(rows[0].pet_types);
|
||||
|
|
Loading…
Reference in a new issue