Skip to content

Commit

Permalink
Fix reference error in PersistentSession.equals.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Casey committed Aug 2, 2015
1 parent d59c988 commit de661ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/persistent_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,12 @@ PersistentSession.prototype.equals = function _psEquals(key, value) {

var isNew = this._dict.keyValueDeps[key][serializedValue].depend();
if (isNew) {
var that = this;
Tracker.onInvalidate(function () {
// clean up [key][serializedValue] if it's now empty, so we don't
// use O(n) memory for n = values seen ever
if (! this._dict.keyValueDeps[key][serializedValue].hasDependents())
delete this._dict.keyValueDeps[key][serializedValue];
if (! that._dict.keyValueDeps[key][serializedValue].hasDependents())
delete that._dict.keyValueDeps[key][serializedValue];
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: "u2622:persistent-session",
version: "0.4.0",
version: "0.4.1",
summary: "Persistently store Session data on the client",
git: "https://github.com/okgrow/meteor-persistent-session"
});
Expand Down

0 comments on commit de661ec

Please sign in to comment.