more optional chaining + lint

This commit is contained in:
Henry Jameson 2026-08-04 16:02:26 +03:00
commit 0637d2f7e0
3 changed files with 4 additions and 7 deletions

View file

@ -229,10 +229,7 @@ export const getLayerSlot = (
*/
export const SLOT_ORDERED = topoSort(
Object.entries(SLOT_INHERITANCE)
.sort(
([, aV], [, bV]) =>
((aV?.priority) || 0) - ((bV && bV.priority) || 0),
)
.sort(([, aV], [, bV]) => (aV?.priority || 0) - (bV?.priority || 0))
.reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}),
)