Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9c91778

Browse files
committed
fixup! fix($sanitize): prevent clobbered elements from freezing the browser
1 parent 0821355 commit 9c91778

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngSanitize/sanitize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ function $SanitizeProvider() {
531531
function getNonDescendant(propName, node) {
532532
// An element is clobbered if its `propName` property points to one of its descendants
533533
var nextNode = node[propName];
534-
if (nodeContains.call(node, nextNode)) {
534+
if (nextNode && nodeContains.call(node, nextNode)) {
535535
throw $sanitizeMinErr('elclob', 'Failed to sanitize html because the element is clobbered: {0}', node.outerHTML || node.outerText);
536536
}
537537
return nextNode;

0 commit comments

Comments
 (0)