Copilot commented on code in PR #13161:
URL: https://github.com/apache/cloudstack/pull/13161#discussion_r3273745616


##########
ui/src/components/view/ImageDeployInstanceButton.vue:
##########
@@ -83,15 +83,16 @@ export default {
   computed: {
     allowed () {
       return (this.$route.meta.name === 'template' ||
-        (this.$route.meta.name === 'iso' && this.resource.bootable))
+        (this.$route.meta.name === 'iso' && this.resource?.bootable)) &&
+        this.resource.isready

Review Comment:
   `allowed()` now uses `this.resource.isready` without a null-safe guard. 
Since this component already treats `resource` as potentially null/undefined 
(see `fetchResourceData` early-return), `allowed` can throw when `resource` is 
unset (e.g., initial render / route change), especially on the `iso` path where 
you added optional chaining for `bootable` but not for `isready`. Use a 
null-safe access (e.g., `this.resource?.isready`) / boolean coercion so the 
computed never throws.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to