mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-04 12:00:02 +00:00
algorithm update
This commit is contained in:
parent
536bd226c6
commit
c027dc5df3
@ -13,8 +13,8 @@ const sortTree = (unsorted) => {
|
||||
//Sort by folder before file, then by name
|
||||
const orderedTree = Object.keys(unsorted)
|
||||
.sort((a, b) => {
|
||||
let a_pinned = unsorted[a].pinned;
|
||||
let b_pinned = unsorted[b].pinned;
|
||||
let a_pinned = unsorted[a].pinned || false;
|
||||
let b_pinned = unsorted[b].pinned || false;
|
||||
if (a_pinned != b_pinned) {
|
||||
if (a_pinned) {
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user