Index: lib/filterStorage.js |
diff --git a/lib/filterStorage.js b/lib/filterStorage.js |
index 9ea35f53365c03fc052c1bf43070f5c7aa54f3f2..3429b5154082435fc64a7eca01a99c0264c9ab50 100644 |
--- a/lib/filterStorage.js |
+++ b/lib/filterStorage.js |
@@ -232,20 +232,22 @@ let FilterStorage = exports.FilterStorage = |
return; // No need to add |
subscription = FilterStorage.getGroupForFilter(filter); |
} |
+ |
if (!subscription) |
{ |
// No group for this filter exists, create one |
subscription = SpecialSubscription.createForFilter(filter); |
this.addSubscription(subscription); |
- return; |
} |
+ else |
+ { |
+ if (typeof position == "undefined") |
+ position = subscription.filters.length; |
- if (typeof position == "undefined") |
- position = subscription.filters.length; |
- |
- if (filter.subscriptions.indexOf(subscription) < 0) |
- filter.subscriptions.push(subscription); |
- subscription.filters.splice(position, 0, filter); |
+ if (filter.subscriptions.indexOf(subscription) < 0) |
+ filter.subscriptions.push(subscription); |
+ subscription.filters.splice(position, 0, filter); |
+ } |
if (!silent) |
FilterNotifier.triggerListeners("filter.added", filter, subscription, position); |
}, |