diff content/collections.js @ 238:d1a66c6f41c4

make unsubscribe work again
author Myk Melez <myk@mozilla.org>
date Tue, 05 Aug 2008 12:44:46 -0700
parents b324ba5e93f0
children 5982695f4890
line wrap: on
line diff
--- a/content/collections.js	Tue Aug 05 12:40:13 2008 -0700
+++ b/content/collections.js	Tue Aug 05 12:44:46 2008 -0700
@@ -328,7 +328,12 @@
   },
 
   unsubscribe: function(aEvent) {
-    let sourceID = this._collections[this._tree.currentIndex].id;
+    let collection = this._rows[this._tree.currentIndex];
+
+    if (!collection.parent || collection.parent.groupIDColumn != "sources.id")
+      return;
+
+    let sourceID = this._rows[this._tree.currentIndex].groupID;
 
     SnowlDatastore.dbConnection.beginTransaction();
     try {