From c8a18f387c28d5f895c1e727b0d040da96dcebc1 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 19 Sep 2019 14:38:55 -0400
Subject: [PATCH] wire up props with PostStatusModal
---
src/components/post_status_form/post_status_form.js | 2 +-
src/components/post_status_modal/post_status_modal.js | 2 +-
src/components/post_status_modal/post_status_modal.vue | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 40bbf6d4..dc4b419c 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -8,7 +8,7 @@ import fileTypeService from '../../services/file_type/file_type.service.js'
import { reject, map, uniqBy } from 'lodash'
import suggestor from '../emoji-input/suggestor.js'
-const buildMentionsString = ({ user, attentions }, currentUser) => {
+const buildMentionsString = ({ user, attentions = [] }, currentUser) => {
let allAttentions = [...attentions]
allAttentions.unshift(user)
diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js
index 15783642..1033ba11 100644
--- a/src/components/post_status_modal/post_status_modal.js
+++ b/src/components/post_status_modal/post_status_modal.js
@@ -12,7 +12,7 @@ const PostStatusModal = {
return this.isLoggedIn && this.$store.state.postStatus.modalActivated
},
params () {
- return this.$store.state.postStatus.params
+ return this.$store.state.postStatus.params || {}
}
},
watch: {
diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue
index 85a5401c..3f8eec69 100644
--- a/src/components/post_status_modal/post_status_modal.vue
+++ b/src/components/post_status_modal/post_status_modal.vue
@@ -13,6 +13,7 @@