FIX: don't fail if targetUsernames is not set
This commit is contained in:
parent
2349ab5a51
commit
653f94975c
|
@ -87,8 +87,13 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
const composer = this.get('composer');
|
const composer = this.get('composer');
|
||||||
if (composer.get('privateMessage')) {
|
if (composer.get('privateMessage')) {
|
||||||
const usernames = composer.get('targetUsernames').split(',');
|
let usernames = composer.get('targetUsernames');
|
||||||
if (usernames.length === 1 && usernames[0] === this.currentUser.get('username')) {
|
|
||||||
|
if (usernames) {
|
||||||
|
usernames = usernames.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usernames && usernames.length === 1 && usernames[0] === this.currentUser.get('username')) {
|
||||||
|
|
||||||
const message = this._yourselfConfirm || composer.store.createRecord('composer-message', {
|
const message = this._yourselfConfirm || composer.store.createRecord('composer-message', {
|
||||||
id: 'yourself_confirm',
|
id: 'yourself_confirm',
|
||||||
|
|
Loading…
Reference in New Issue