Skip to content

Commit

Permalink
[fix] Fixed system context JS error #334
Browse files Browse the repository at this point in the history
Fixes #334
  • Loading branch information
NoumbissiValere authored Dec 7, 2020
1 parent fb6aa7e commit 94c20a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openwisp_controller/config/static/config/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ evaluateVars = function (data, context) {

getAllContext = function () {
var userContextField = getContext(),
systemContext = JSON.parse(document.getElementById('system_context').textContent),
systemContextField = document.getElementById('system_context'),
value;
if (userContextField) {
var defaultValues = JSON.parse(userContextField.value);
var defaultValues = JSON.parse(userContextField.value),
systemContext = JSON.parse(systemContextField.textContent);
value = Object.assign(
{},
systemContext,
Expand Down

0 comments on commit 94c20a1

Please sign in to comment.