Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Commit

Permalink
unload hotfix (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
datamadic authored and HarsimranSingh committed Aug 3, 2017
1 parent 1f943ef commit e6ab4db
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/browser/subscription_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ function SubscriptionManager() {
}

function removeSubscription(identity, ...args) {
let key = genSubscriptionKey.apply(null, args),
identityKey = identityToKey(identity),
subscription = subscriptionList.get(identityKey).get(key);
const key = genSubscriptionKey.apply(null, args);
const identityKey = identityToKey(identity);
const subscriptionId = subscriptionList.get(identityKey);
const subscription = subscriptionId && subscriptionId.get(key);

if (!subscription) {
return;
}

subscription.refCount--;
if (subscription.refCount <= 0) {
Expand Down

0 comments on commit e6ab4db

Please sign in to comment.