fix: ensure we have vars before attempting to fetch from them
This commit is contained in:
parent
1f7545634b
commit
c30b52c9d8
|
@ -109,8 +109,10 @@ class TelnetClient {
|
||||||
|
|
||||||
// get a value from vars with fallback of user vars
|
// get a value from vars with fallback of user vars
|
||||||
const getValue = (name) => {
|
const getValue = (name) => {
|
||||||
return command.optionData.vars.find(nv => nv.name === name) ||
|
return command.optionData.vars &&
|
||||||
command.optionData.userVars.find(nv => nv.name === name);
|
(command.optionData.vars.find(nv => nv.name === name) ||
|
||||||
|
command.optionData.userVars.find(nv => nv.name === name)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
if ('unknown' === this.term.termType) {
|
if ('unknown' === this.term.termType) {
|
||||||
|
|
Loading…
Reference in New Issue