Mathijs den Burger pushed to branch feature/cmng-psp1 at cms-community / 
hippo-addon-channel-manager


Commits:
1b2faa03 by Mathijs den Burger at 2016-05-30T14:57:07+02:00
CHANNELMGR-337 prevent parse error in IE

IE only supports node.contains() for elements.

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js


Changes:

=====================================
frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js
=====================================
--- a/frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js
+++ b/frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js
@@ -136,7 +136,8 @@ export class PageStructureElement {
     const endCommentNode = this.getEndComment()[0];
     let node = this.getStartComment()[0].nextSibling;
     while (node && node !== endCommentNode) {
-      if (node.contains(domElement)) {
+      // IE only supports contains() for elements, which have nodeType 1
+      if (node.nodeType === 1 && node.contains(domElement)) {
         return true;
       }
       node = node.nextSibling;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/1b2faa0309741df99bad36cd3ad01610e7c3a093
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to