Skip to content

Commit 7924a23

Browse files
committed
fix: masonry sort order fix for non-safari browsers
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 6c87cd4 commit 7924a23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pdl-live-react/src/view/masonry/model.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ export default function computeModel(block: import("../../pdl_ast").PdlBlock) {
8686
return []
8787
})
8888
.filter(removeFluff)
89-
.sort((a, b) => (!/\./.test(a.id) ? 1 : a.id.localeCompare(b.id)))
89+
.sort((a, b) =>
90+
!/\./.test(a.id) ? 1 : !/\./.test(b.id) ? -1 : a.id.localeCompare(b.id),
91+
)
9092
// ^^^ re: the regexp test, we want to place the "final output"
9193
// (i.e. blocks without a "." in their id) at the end
9294

0 commit comments

Comments
 (0)