In my current project, I'm attempting to compare specific values of an initial object with an updated object in order to disable a button if they are the same. However, despite making changes, the button remains disabled:
setDisabled() {
return this.selectedItem.color === this.selectedItemInitial.color &&
this.selectedItem.price === this.selectedItemInitial.price;
},
I'm puzzled as to what is causing this issue and why the boolean value isn't changing. Any insights?