Skip to content
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ data.json
# Exclude macOS Finder (System Explorer) View States
.DS_Store
/yarn.lock
/.run/test.run.xml
/.run/build.run.xml
2 changes: 1 addition & 1 deletion src/custom-sort/folder-matching-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class FolderWildcardMatching<SortingSpec> {
}
}

rule = rule ?? inheritedRule
rule ??= inheritedRule
}

if (rule) {
Expand Down
6 changes: 3 additions & 3 deletions src/custom-sort/sorting-spec-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -673,23 +673,23 @@ export interface SortSpecsCollection {
}

const ensureCollectionHasSortSpecByPath = (collection?: SortSpecsCollection | null) => {
collection = collection ?? {}
collection ??= {}
if (!collection.sortSpecByPath) {
collection.sortSpecByPath = {}
}
return collection
}

const ensureCollectionHasSortSpecByName = (collection?: SortSpecsCollection | null) => {
collection = collection ?? {}
collection ??= {}
if (!collection.sortSpecByName) {
collection.sortSpecByName = {}
}
return collection
}

const ensureCollectionHasSortSpecByWildcard = (collection?: SortSpecsCollection | null) => {
collection = collection ?? {}
collection ??= {}
if (!collection.sortSpecByWildcard) {
collection.sortSpecByWildcard = new FolderWildcardMatching<CustomSortSpec>((spec: CustomSortSpec) => !!spec.implicit)
}
Expand Down
Loading
Loading