Fix rebuilding clipboard markings if no items are marked
authorMatthias Schmidt <gravatronics@live.com>
Mon, 22 Jun 2015 17:58:02 +0000 (19:58 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 22 Jun 2015 17:58:02 +0000 (19:58 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js

index 242578f10bf410cd005a73f819677679373b5066..69a7d94cf08f160a2c0290d1e8859eab277ca777 100644 (file)
@@ -448,7 +448,7 @@ define(
                        _containers.forEach((function(containerData) {
                                var typeName = containerData.element.getAttribute('data-type');
                                
-                               var objectIds = (data.returnValues.markedItems.hasOwnProperty(typeName)) ? data.returnValues.markedItems[typeName] : [];
+                               var objectIds = (data.returnValues.markedItems && data.returnValues.markedItems.hasOwnProperty(typeName)) ? data.returnValues.markedItems[typeName] : [];
                                this._rebuildMarkings(containerData, objectIds);
                        }).bind(this));