refactor(utils.ts): add parameter arg0 to addWatcher callback for improved readability

This commit is contained in:
Sped0n
2023-11-02 12:27:58 +08:00
parent 8b48cceb8f
commit dd01dd8bec
5 changed files with 14 additions and 14 deletions

View File

@@ -4,8 +4,8 @@ export let container: HTMLDivElement
export function initContainer(): void {
container = document.getElementsByClassName('container').item(0) as HTMLDivElement
scrollable.addWatcher(() => {
if (scrollable.get()) {
scrollable.addWatcher((o) => {
if (o) {
container.classList.remove('disableScroll')
} else {
container.classList.add('disableScroll')