autogen: Minor Fix in Autogen (#579)

Add defensive check

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Pearl Dsilva 2020-08-13 15:07:22 +05:30 committed by Rohit Yadav
parent 3ced416660
commit 0763cf4ce0
2 changed files with 2 additions and 2 deletions

View File

@ -229,4 +229,4 @@ For example,
]
```
Additional tabs can be defined by adding on to the tabs section.
Additional tabs can be defined by adding on to the tabs section.

View File

@ -749,7 +749,7 @@ export default {
continue
}
param.opts = json[obj][res]
if (this.currentAction.mapping[param.name] && this.currentAction.mapping[param.name].filter) {
if (this.currentAction.mapping && this.currentAction.mapping[param.name] && this.currentAction.mapping[param.name].filter) {
const filter = this.currentAction.mapping[param.name].filter
param.opts = json[obj][res].filter(filter)
}