summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGokhan Apaydin <gapay84@gmail.com>2019-01-30 21:14:42 +0000
committerTim Zallmann <tzallmann@gitlab.com>2019-01-30 21:14:42 +0000
commit74dc0c1866322c1f7f2ce0f0eb382f9d8c209858 (patch)
tree7ea1f638564d5193b24145fdaaf01733055884f4
parent870a18e8851bb93099b7e34573afa3cfae15a040 (diff)
downloadgitlab-ce-74dc0c1866322c1f7f2ce0f0eb382f9d8c209858.tar.gz
fix display comment avatars issue in IE 11
-rw-r--r--app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue3
-rw-r--r--changelogs/unreleased/patch-38.yml5
2 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue
index 95f4395ac13..a6c1737dcab 100644
--- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue
+++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue
@@ -68,7 +68,8 @@ export default {
sanitizedSource() {
let baseSrc = this.imgSrc === '' || this.imgSrc === null ? defaultAvatarUrl : this.imgSrc;
// Only adds the width to the URL if its not a base64 data image
- if (!baseSrc.startsWith('data:') && !baseSrc.includes('?')) baseSrc += `?width=${this.size}`;
+ if (!(baseSrc.indexOf('data:') === 0) && !baseSrc.includes('?'))
+ baseSrc += `?width=${this.size}`;
return baseSrc;
},
resultantSrcAttribute() {
diff --git a/changelogs/unreleased/patch-38.yml b/changelogs/unreleased/patch-38.yml
new file mode 100644
index 00000000000..9179fc6846e
--- /dev/null
+++ b/changelogs/unreleased/patch-38.yml
@@ -0,0 +1,5 @@
+---
+title: fix display comment avatars issue in IE 11
+merge_request: 24777
+author: Gokhan Apaydin
+type: fixed