Skip to content

Commit

Permalink
fix local ppolicy loading on pages where policy.tpl is not included (#36
Browse files Browse the repository at this point in the history
)
  • Loading branch information
David Coutadeur committed Oct 31, 2024
1 parent a53bbf2 commit 6d58338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ppolicy/js/ppolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

barWidth = new Map([["Err", "0"], ["0", "20"], ["1", "40"], ["2", "60"], ["3", "80"], ["4", "100"]]);

json_policy = $("#json-policy").data('policy');
json_policy = $("#json-policy").data('policy') || btoa("{}") ;
var local_policy = JSON.parse(atob(json_policy));

displayEntropyBar = function(level) {
Expand Down

0 comments on commit 6d58338

Please sign in to comment.