Skip to content

Commit

Permalink
Issue #61 - Updating solution for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
aywaldron committed Nov 29, 2018
1 parent f43ff11 commit 1037630
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ait/gui/static/js/ait/gui/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ const Field =
// Mithril lifecycle method
oninit (vnode) {
this._fname = vnode.attrs.name
this._dname = vnode.attrs.display_name
this._pname = vnode.attrs.packet
this._raw = vnode.attrs.raw === true
this._cached = { packet: null, val: null }
Expand Down Expand Up @@ -364,7 +363,12 @@ const Field =
}
}

return m('ait-field', vnode.attrs, [m('name', this._dname + ': '),
let dname = ""
if (vnode.attrs.display_name) {
dname = vnode.attrs.display_name + ': '
}

return m('ait-field', vnode.attrs, [m('name', dname),
m('value', value)])
}
}
Expand Down

0 comments on commit 1037630

Please sign in to comment.