Skip to content

Commit 1322dba

Browse files
committed
#202 Syntax sugar to satisfy stricter TS compilation rules and improve readability
1 parent 5bb04f4 commit 1322dba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,10 @@ export default class CustomSortPlugin
707707
workspaceLeafContentElementParentToObserve = document.querySelector(".workspace");
708708
}
709709
if (workspaceLeafContentElementParentToObserve) {
710+
// Syntax sugar to satisfy the strict TypeScript compiler
711+
const fileExplorerParentElement = workspaceLeafContentElementParentToObserve
710712
const fullyFledgedFileExplorerElementSelector=
711-
() => workspaceLeafContentElementParentToObserve.querySelector('[data-type="file-explorer"] .nav-files-container');
713+
() => fileExplorerParentElement.querySelector('[data-type="file-explorer"] .nav-files-container');
712714

713715
const mutationObserver = new MutationObserver((_, observerInstance) => {
714716
const fullyFledgedFileExplorerElement = fullyFledgedFileExplorerElementSelector();

0 commit comments

Comments
 (0)