diff --git a/src/snapshot.ts b/src/snapshot.ts index c01f5b2c..e5f79f35 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -183,11 +183,13 @@ export function _isBlockedElement( return true; } } else { - element.classList.forEach((className) => { + // tslint:disable-next-line: prefer-for-of + for (let eIndex = 0; eIndex < element.classList.length; eIndex++) { + const className = element.classList[eIndex]; if (blockClass.test(className)) { return true; } - }); + } } if (blockSelector) { return element.matches(blockSelector);