Skip to content

Commit

Permalink
fix error occurring creating a new wizard script; fix energy monitor …
Browse files Browse the repository at this point in the history
…widget
  • Loading branch information
genemars committed Oct 25, 2018
1 parent 4d93648 commit d765128
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ HG.WebApp.ProgramsList = HG.WebApp.ProgramsList || new function () { var $$ = th
editor3.markClean();
//
if (program.Type.toLowerCase() === 'wizard') {
var script = JSON.parse(program.ScriptSource);
var script = {ConditionType: '', Conditions: [], Commands: []};
try { script = JSON.parse(program.ScriptSource); } catch (e) { }
currentProgram.ConditionType = script.ConditionType;
currentProgram.Conditions = script.Conditions;
currentProgram.Commands = script.Commands;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function drawStats(mod) {
type: 'GET',
dataType: 'json',
success: function (counterData) {

if (counterData.History == null) return;
var dataSerie = [];
var yMin = 0;
if (counterData.History.length > 0)
Expand Down

0 comments on commit d765128

Please sign in to comment.