Skip to content

Commit

Permalink
fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Tellis committed Mar 16, 2015
1 parent b9f2272 commit 4bcfc88
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions plugins/bw.js
Expand Up @@ -88,7 +88,7 @@ impl = {
fw = (q3-q1)*1.5;

// fw === 0 => all items are identical, so no need to filter
if (fw === 0) {
if(fw === 0) {
return a;
}

Expand Down Expand Up @@ -235,7 +235,7 @@ impl = {
(bandwidths[Math.floor(n/2)] + bandwidths[Math.ceil(n/2)]) / 2
);

if (bandwidths_corrected.length < 1) {
if(bandwidths_corrected.length < 1) {
BOOMR.debug("not enough valid corrected datapoints, falling back to uncorrected", "bw");
debug_info.push("l==" + bandwidths_corrected.length);

Expand Down Expand Up @@ -290,7 +290,7 @@ impl = {
callback.call(that, i, tstart, run, value);
}

if (value !== null) {
if(value !== null) {
img.onload=img.onerror=null;
img=null;
clearTimeout(timer);
Expand Down Expand Up @@ -413,8 +413,9 @@ impl = {

this.complete = true;

if (this.block_beacon === true)
if(this.block_beacon === true) {
BOOMR.sendBeacon();
}

this.running = false;
},
Expand All @@ -440,7 +441,7 @@ impl = {

cookies = BOOMR.utils.getSubCookies(BOOMR.utils.getCookie(impl.cookie));

if (cookies && cookies.ba) {
if(cookies && cookies.ba) {

ba = parseInt(cookies.ba, 10);
bw_e = parseFloat(cookies.be, 10);
Expand Down Expand Up @@ -532,8 +533,9 @@ BOOMR.plugins.BW = {
BOOMR.info("HTTPS detected, skipping bandwidth test", "bw");
impl.complete = true;

if (impl.block_beacon === true)
if(impl.block_beacon === true) {
BOOMR.sendBeacon();
}

return this;
}
Expand All @@ -550,16 +552,15 @@ BOOMR.plugins.BW = {

abort: function() {
impl.aborted = true;
if (impl.running) {
if(impl.running) {
impl.finish(); // we don't defer this call because it might be called from
// onunload and we want the entire chain to complete
// before we return
}
},

is_complete: function() {
if (impl.block_beacon === true)
{
if(impl.block_beacon === true) {
return impl.complete;
}
else {
Expand Down

0 comments on commit 4bcfc88

Please sign in to comment.