Skip to content

Commit

Permalink
xdrip-js.js uses ES6 syntax for let and webpack@3 does not like that
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterGit committed Aug 7, 2018
1 parent 5788ff3 commit a2f8b47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/plugins/xdrip-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ function init(ctx) {

// session start is only valid if in a session
if (sensor && sensor.lastSessionStart && (sensor.lastState != 0x1)) {
let diffTime = moment().diff(moment(sensor.lastSessionStart));
let duration = moment.duration(diffTime);
var diffTime = moment().diff(moment(sensor.lastSessionStart));
var duration = moment.duration(diffTime);

sessionDuration = duration.days() + ' days ' + duration.hours() + ' hours';

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"start": "node server.js",
"test": "make test",
"env": "env",
"postinstall": "webpack --mode production --config webpack.config.js && npm run-script update-buster",
"bundle": "webpack --mode production --config webpack.config.js && npm run-script update-buster",
"bundle-dev": "webpack --mode development --config webpack.config.js && npm run-script update-buster",
"bundle-analyzer": "webpack --mode development --config webpack.config.js --profile --json > stats.json && webpack-bundle-analyzer stats.json",
"postinstall": "webpack --config webpack.config.js && npm run-script update-buster",
"bundle": "webpack --config webpack.config.js && npm run-script update-buster",
"bundle-dev": "webpack --config webpack.config.js && npm run-script update-buster",
"bundle-analyzer": "webpack --config webpack.config.js --profile --json > stats.json && webpack-bundle-analyzer stats.json",
"update-buster": "node bin/generateCacheBuster.js >tmp/cacheBusterToken"
},
"config": {
Expand Down

0 comments on commit a2f8b47

Please sign in to comment.