Skip to content

Commit 680bde2

Browse files
committed
fix(dom): correct callback invocation and clean event listener spacing
- Fixed invocation of waiting callbacks using consistent naming in dom module - Removed unnecessary whitespace in event listener removal logic - Deleted obsolete todo list with outdated notes on modules and commands
1 parent 7298158 commit 680bde2

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

package/src/client/dom/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const waitingCallbacks: Array<() => void> = []
55

66
onNuiCallback('__DOMLoaded', () => {
77
domLoaded = true
8-
waitingCallbacks.forEach(fn => fn())
8+
waitingCallbacks.forEach(Function => Function())
99
waitingCallbacks.length = 0
1010
})
1111

package/src/web/onNuiCallback/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ export default <T extends any[] = any[]>(
1616
}
1717

1818
window.addEventListener('message', handler)
19-
19+
2020
return () => window.removeEventListener('message', handler)
2121
}

todo

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)