Skip to content

Commit

Permalink
fix: Allow for a KubeResourceMeta with no verbs array (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkingit authored Feb 24, 2021
1 parent d6df2c7 commit aa29078
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/KubeResourceMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ module.exports = class KubeResourceMeta {
}

hasVerb(verb) {
return this.verbs.some(v => verb == v);
let result=false;
if (Array.isArray(this.verbs)){
result=this.verbs.some(v => verb == v);
}
return result;
}
addHeader(key, value) {
objectPath.set(this._extraHeaders, ['headers', key], value);
Expand Down

0 comments on commit aa29078

Please sign in to comment.