summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2021-05-12 01:02:00 +0300
committerDerick Montague <derick.montague@ibm.com>2021-05-13 21:32:12 +0300
commitf7cd5e03759a6ba259ecb7b2d2e4d5629ee884cd (patch)
tree6c71c3aa96205d877edfa9222ac53944ca6e335c
parent4904126c0b1d9a3aa6d8b4012a41d2b9e03e5ebc (diff)
downloadwebui-vue-f7cd5e03759a6ba259ecb7b2d2e4d5629ee884cd.tar.xz
Add check for allowableActions in firmware store
Using optional chaining to test that TFTP is included in the allowaableActions property to prevent an error being thrown if that property is not present. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: If0009810aaf3b9abd23fcdc41606fbdbcf17a347
-rw-r--r--src/store/modules/Configuration/FirmwareStore.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/store/modules/Configuration/FirmwareStore.js b/src/store/modules/Configuration/FirmwareStore.js
index 3b4bd853..c6639ff7 100644
--- a/src/store/modules/Configuration/FirmwareStore.js
+++ b/src/store/modules/Configuration/FirmwareStore.js
@@ -115,7 +115,7 @@ const FirmwareStore = {
];
commit('setApplyTime', applyTime);
- if (allowableActions.includes('TFTP')) {
+ if (allowableActions?.includes('TFTP')) {
commit('setTftpUploadAvailable', true);
}
})