Permalink
Browse files

Merge pull request #15 from astoundlabs/master

Cleaning up leaked global finalState
  • Loading branch information...
2 parents 1b07cad + f346a30 commit 5ea9eab89f361c4f35ccbb840d8a3b17a57f03d4 @assistunion committed Aug 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/xml-stream.js
View
@@ -197,7 +197,7 @@ function parseEvent(event) {
// and returns its last state.
function getFinalState(selector) {
if (__own.call(this._finalStates, selector.normalized)) {
- finalState = this._finalStates[selector.normalized];
+ var finalState = this._finalStates[selector.normalized];
} else {
var n = selector.parts.length;
var immediate = false;
@@ -214,7 +214,7 @@ function getFinalState(selector) {
immediate = false;
}
}
- finalState = this._lastState++;
+ var finalState = this._lastState++;
this._finalStates[selector.normalized] = finalState;
}
return finalState;

0 comments on commit 5ea9eab

Please sign in to comment.