We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c0400a7 + 6746a3e commit 424c213Copy full SHA for 424c213
1 file changed
src/components/profile/edit/EditPictureModal.vue
@@ -20,7 +20,7 @@
20
<button
21
type="button"
22
class="button button--secondary"
23
- :disabled="imgSrc === null"
+ :disabled="deleteDisabled"
24
@click="deleteImg"
25
>
26
Delete Photo
@@ -124,6 +124,17 @@ export default {
124
}
125
},
126
127
+ computed: {
128
+ deleteDisabled() {
129
+ const isEmptyPicture =
130
+ this.picture &&
131
+ (this.picture.value.startsWith('default:') ||
132
+ this.picture.value === null ||
133
+ this.picture.value === '' ||
134
+ this.picture.value.startsWith('https://s3.amazonaws.com/'));
135
+ return isEmptyPicture && this.imgSrc === null;
136
+ },
137
138
};
139
</script>
140
0 commit comments