Skip to content

Commit 2ed67a0

Browse files
authored
Merge pull request #189 from SebastianMC/188-compat-obsidian-1-7-2
#188 - tested all relevant scenarios, including long auto-apply delay with plugin disabled / removed in the interim.
2 parents 2c2053d + ef5926c commit 2ed67a0

File tree

7 files changed

+239
-178
lines changed

7 files changed

+239
-178
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ data.json
2121
# Exclude macOS Finder (System Explorer) View States
2222
.DS_Store
2323
/yarn.lock
24+
/.run/test.run.xml
25+
/.run/build.run.xml

src/custom-sort/folder-matching-rules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class FolderWildcardMatching<SortingSpec> {
161161
}
162162
}
163163

164-
rule = rule ?? inheritedRule
164+
rule ??= inheritedRule
165165
}
166166

167167
if (rule) {

src/custom-sort/sorting-spec-processor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,23 +673,23 @@ export interface SortSpecsCollection {
673673
}
674674

675675
const ensureCollectionHasSortSpecByPath = (collection?: SortSpecsCollection | null) => {
676-
collection = collection ?? {}
676+
collection ??= {}
677677
if (!collection.sortSpecByPath) {
678678
collection.sortSpecByPath = {}
679679
}
680680
return collection
681681
}
682682

683683
const ensureCollectionHasSortSpecByName = (collection?: SortSpecsCollection | null) => {
684-
collection = collection ?? {}
684+
collection ??= {}
685685
if (!collection.sortSpecByName) {
686686
collection.sortSpecByName = {}
687687
}
688688
return collection
689689
}
690690

691691
const ensureCollectionHasSortSpecByWildcard = (collection?: SortSpecsCollection | null) => {
692-
collection = collection ?? {}
692+
collection ??= {}
693693
if (!collection.sortSpecByWildcard) {
694694
collection.sortSpecByWildcard = new FolderWildcardMatching<CustomSortSpec>((spec: CustomSortSpec) => !!spec.implicit)
695695
}

0 commit comments

Comments
 (0)