Replace forEach() with for()

This commit is contained in:
redphx
2024-10-22 10:42:09 +07:00
parent 01502363ab
commit 6cfff0274d
7 changed files with 25 additions and 16 deletions

View File

@@ -221,9 +221,10 @@ export class StreamUiHandler {
}
const observer = new MutationObserver(mutationList => {
mutationList.forEach(item => {
let item: MutationRecord;
for (item of mutationList) {
if (item.type !== 'childList') {
return;
continue;
}
item.addedNodes.forEach(async $node => {
@@ -263,7 +264,7 @@ export class StreamUiHandler {
// Handle System Menu bar
StreamUiHandler.handleSystemMenu($elm);
});
});
};
});
observer.observe($screen, {subtree: true, childList: true});