Skip to content

Commit

Permalink
Merge ed3831a into 3bdacf6
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Feb 14, 2015
2 parents 3bdacf6 + ed3831a commit da0f6cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pebble.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function configure (entries, devicestatus, env) {
function middle (req, res, next) {
req.entries = entries;
req.devicestatus = devicestatus;
req.rawbg = env.enable.indexOf('rawbg') > -1;
req.rawbg = env.enable && env.enable.indexOf('rawbg') > -1;
next( );
}
return [middle, pebble];
Expand Down
1 change: 0 additions & 1 deletion tests/pebble.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ describe('Pebble Endpoint without Raw', function ( ) {
var pebble = require('../lib/pebble');
before(function (done) {
var env = require('../env')( );
env.enable = "";
this.app = require('express')( );
this.app.enable('api');
this.app.use('/pebble', pebble(entries, devicestatus, env));
Expand Down

0 comments on commit da0f6cc

Please sign in to comment.