Skip to content

Commit

Permalink
Sometimes at the very start no profiles provided. (#5591)
Browse files Browse the repository at this point in the history
At the first start the nightscout is crashed if profile not full.
  • Loading branch information
GermanBluefox committed Jun 12, 2020
1 parent 5698ae2 commit 500de79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/data/ddata.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function init () {
results.cals = ddata.cals;

var profiles = _.cloneDeep(ddata.profiles);
if (profiles && profiles[0]) {
if (profiles && profiles[0] && profiles[0].store) {
Object.keys(profiles[0].store).forEach(k => {
if (k.indexOf('@@@@@') > 0) {
delete profiles[0].store[k];
Expand Down

0 comments on commit 500de79

Please sign in to comment.