mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: don't fail if targetUsernames is not set
This commit is contained in:
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user