Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 15:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 15:09:00 +0300
commit88a0824944720b6edaaef56376713541b9a02118 (patch)
treef5fcc4f9755f249779cda9a8f02902d734af6e7e /app/assets/javascripts/vue_shared
parent7d19df2d34a9803d9f077c16315ba919b7ae2aa2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r--app/assets/javascripts/vue_shared/components/markdown/field.vue8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/field.vue b/app/assets/javascripts/vue_shared/components/markdown/field.vue
index 4f5f3ee5cf9..e30876813c2 100644
--- a/app/assets/javascripts/vue_shared/components/markdown/field.vue
+++ b/app/assets/javascripts/vue_shared/components/markdown/field.vue
@@ -79,6 +79,12 @@ export default {
required: false,
default: false,
},
+ // This prop is used as a fallback in case if textarea.elm is undefined
+ textareaValue: {
+ type: String,
+ required: false,
+ default: '',
+ },
},
data() {
return {
@@ -183,7 +189,7 @@ export default {
Can't use `$refs` as the component is technically in the parent component
so we access the VNode & then get the element
*/
- const text = this.$slots.textarea[0].elm.value;
+ const text = this.$slots.textarea[0]?.elm?.value || this.textareaValue;
if (text) {
this.markdownPreviewLoading = true;