You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/11/08 10:01:16 UTC
[GitHub] [cloudstack] utchoang commented on a change in pull request #5630: simplify code using optional chaining in multiple views
utchoang commented on a change in pull request #5630:
URL: https://github.com/apache/cloudstack/pull/5630#discussion_r744567497
##########
File path: ui/src/views/network/CreateL2NetworkForm.vue
##########
@@ -114,15 +114,15 @@
</a-select>
</a-form-item>
<a-form-item v-if="!this.isObjectEmpty(this.selectedNetworkOffering) && this.selectedNetworkOffering.specifyvlan">
- <tooltip-label slot="label" :title="$t('label.vlan')" :tooltip="apiParams.vlan ? apiParams.vlan.description : null"/>
+ <tooltip-label slot="label" :title="$t('label.vlan')" :tooltip="apiParams.vlan?.description || null"/>
Review comment:
@Damans227 Don't apply simplify code to <template> because it won't work.
##########
File path: ui/src/views/network/CreateL2NetworkForm.vue
##########
@@ -114,15 +114,15 @@
</a-select>
</a-form-item>
<a-form-item v-if="!this.isObjectEmpty(this.selectedNetworkOffering) && this.selectedNetworkOffering.specifyvlan">
- <tooltip-label slot="label" :title="$t('label.vlan')" :tooltip="apiParams.vlan ? apiParams.vlan.description : null"/>
+ <tooltip-label slot="label" :title="$t('label.vlan')" :tooltip="apiParams.vlan?.description || null"/>
<a-input
v-decorator="['vlanid', {
rules: [{ required: true, message: $t('message.please.enter.value') }]
}]"
:placeholder="this.$t('label.vlanid')"/>
</a-form-item>
<a-form-item v-if="!this.isObjectEmpty(this.selectedNetworkOffering) && this.selectedNetworkOffering.specifyvlan">
- <tooltip-label slot="label" :title="$t('label.bypassvlanoverlapcheck')" :tooltip="apiParams.bypassvlanoverlapcheck ? apiParams.bypassvlanoverlapcheck.description : null"/>
+ <tooltip-label slot="label" :title="$t('label.bypassvlanoverlapcheck')" :tooltip="apiParams.bypassvlanoverlapcheck?.description || null"/>
Review comment:
@Damans227 Same here!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org