diff options
Diffstat (limited to 'app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue')
-rw-r--r-- | app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue b/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue index 6e7c85053dc..6edd6530bc5 100644 --- a/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue +++ b/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue @@ -71,7 +71,7 @@ export default { }, computed: { forcePushAttributes() { - const { allowForcePush } = this.branchProtection; + const { allowForcePush } = this.branchProtection || {}; const icon = allowForcePush ? REQUIRED_ICON : NOT_REQUIRED_ICON; const iconClass = allowForcePush ? REQUIRED_ICON_CLASS : NOT_REQUIRED_ICON_CLASS; const title = allowForcePush @@ -81,7 +81,7 @@ export default { return { icon, iconClass, title }; }, codeOwnersApprovalAttributes() { - const { codeOwnerApprovalRequired } = this.branchProtection; + const { codeOwnerApprovalRequired } = this.branchProtection || {}; const icon = codeOwnerApprovalRequired ? REQUIRED_ICON : NOT_REQUIRED_ICON; const iconClass = codeOwnerApprovalRequired ? REQUIRED_ICON_CLASS : NOT_REQUIRED_ICON_CLASS; const title = codeOwnerApprovalRequired |