drowsy-probius / twitch-icon-selector

Found unsafe function declarations JS-0073
Bug risk
Major
a year ago2 years old
Function declared in a loop contains unsafe references to variable(s) 'chatBody', 'chatBody'.
445    const children = record.addedNodes;
446    for(const child of children)
447    {
448      child.querySelectorAll(chatLineParentSelector).forEach(lineParent => {449        chatBody = lineParent.lastChild;450        replaceChatData(chatBody);451      });452    }
453  }
454}
Function declared in a loop contains unsafe references to variable(s) 'tippy'.
290               */
291              const image = preRenderedIcons.image[icon.nameHash].cloneNode();
292              image.onclick = iconClickHandlerInChat;
293              image.onmouseover = () => {294                tippy(image, {295                  hideOnClick: true,296                  placement: "top-end",297                  theme: "twitch",298                }).show();299              }300              image.onmouseout = () => {
301                image._tippy && image._tippy.destroy();
302              }
Function declared in a loop contains unsafe references to variable(s) 'fail', 'logger', 'error'
67    for(let i=0; i<this.functions.length; i++)
68    {
69      if(this.stop) return;
70      await (async () => {71        if(fail) {72          logger.info(error);73          return;74        };75        await this.functions[i](); 76      })();77    }
78  }
79}