#202 Syntax sugar to satisfy stricter TS compilation rules and improve readability

This commit is contained in:
SebastianMC 2025-04-23 00:20:32 +02:00
parent 5bb04f41a1
commit 1322dbab52
1 changed files with 3 additions and 1 deletions

View File

@ -707,8 +707,10 @@ export default class CustomSortPlugin
workspaceLeafContentElementParentToObserve = document.querySelector(".workspace");
}
if (workspaceLeafContentElementParentToObserve) {
// Syntax sugar to satisfy the strict TypeScript compiler
const fileExplorerParentElement = workspaceLeafContentElementParentToObserve
const fullyFledgedFileExplorerElementSelector=
() => workspaceLeafContentElementParentToObserve.querySelector('[data-type="file-explorer"] .nav-files-container');
() => fileExplorerParentElement.querySelector('[data-type="file-explorer"] .nav-files-container');
const mutationObserver = new MutationObserver((_, observerInstance) => {
const fullyFledgedFileExplorerElement = fullyFledgedFileExplorerElementSelector();