Skip to content

A platform for community discussion. Free, open, simple.

FIX: Update user-selector excluded usernames after insert (#8711)

Mark VanLandingham5df0ef1e984c
diff --git a/app/assets/javascripts/discourse/components/user-selector.js.es6 b/app/assets/javascripts/discourse/components/user-selector.js.es6
index fafd0b3ff32..79de2262f37 100644
--- a/app/assets/javascripts/discourse/components/user-selector.js.es6
+++ b/app/assets/javascripts/discourse/components/user-selector.js.es6
@@ -60,8 +60,7 @@ export default TextField.extend({
allowAny = bool("allowAny"),
disabled = bool("disabled"),
allowEmails = bool("allowEmails"),
- fullWidthWrap = bool("fullWidthWrap"),
- excludedUsernames = this.excludedUsernames || [];
+ fullWidthWrap = bool("fullWidthWrap");
const allExcludedUsernames = () => {
// hack works around some issues with allowAny eventing
@@ -71,7 +70,7 @@ export default TextField.extend({
usernames.concat([currentUser.username]);
}
- return usernames.concat(excludedUsernames);
+ return usernames.concat(this.excludedUsernames || []);
};
this.element.addEventListener("paste", this._paste);