Permalink
Browse files

use initialized instead of complete to determine if we have run init …

…or not
  • Loading branch information...
1 parent 7b3eaaf commit 2c1b5e74094c624ec572cd0a6216e1dca00eb250 @bluesmoon committed Jan 24, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 plugins/bw.js
View
@@ -55,8 +55,10 @@ var impl = {
latency: null,
runs_left: 0,
aborted: false,
- complete: false,
+ complete: true, // defaults to true so we don't block other plugins if this cannot start.
+ // init sets it to false
running: false,
+ initialized: false,
// methods
@@ -460,7 +462,7 @@ BOOMR.plugins.BW = {
init: function(config) {
var cookies;
- if(impl.complete) {
+ if(impl.initialized) {
return this;
}
@@ -493,6 +495,8 @@ BOOMR.plugins.BW = {
BOOMR.subscribe("page_unload", this.skip, null, this);
}
+ impl.initialized = true;
+
return this;
},

0 comments on commit 2c1b5e7

Please sign in to comment.