Fix check in Clipboard.js for parent's class
authorMatthias Schmidt <gravatronics@live.com>
Thu, 14 Jul 2016 17:45:40 +0000 (19:45 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 14 Jul 2016 17:45:40 +0000 (19:45 +0200)
`Document` has no property `classList`.

wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js

index 41d2073727f671694ec64e1fbc05cf49a61fc224..c0e8cbde9d9adeae76df27471c3a18f9002c4e2d 100644 (file)
@@ -540,7 +540,7 @@ define(
                                
                                var parent = data.markAll;
                                while (parent = parent.parentNode) {
-                                       if (parent.classList.contains('columnMark')) {
+                                       if (parent instanceof Element && parent.classList.contains('columnMark')) {
                                                parent = parent.parentNode;
                                                break;
                                        }