Skip to content

Commit

Permalink
Check if field exists in dntoeu (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Futabay committed May 19, 2020
1 parent 4a5bf0e commit dd52c2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ait/gui/static/js/ait/gui/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,16 @@ const MnemonicSearch = {

let val = 'N/A'
let raw = 'N/A'
let dneu = 'N/A'
let curTime = format.datetime(new Date(), {utc: true, gps: false})
let curPacket = (ait.packets[this._packet] ?
ait.packets[this._packet].get(0) :
null
)

if (curPacket !== null) {
val = getPacket(curPacket, raw=false)
dneu = this._selection in curPacket['dntoeu']
val = getPacket(curPacket, !dneu)
val = val[this._selection]
raw = curPacket['raw'][this._selection]
}
Expand Down

0 comments on commit dd52c2a

Please sign in to comment.