Skip to content

Commit d138d4d

Browse files
author
Elad Heller
committed
prototype.js: check element has parent node before remove.
1 parent 44d8a93 commit d138d4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/web/prototype/prototype.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
22052205

22062206
function remove(element) {
22072207
element = $(element);
2208-
element.parentNode.removeChild(element);
2208+
element.parentNode && element.parentNode.removeChild(element);
22092209
return element;
22102210
}
22112211

0 commit comments

Comments
 (0)