FIX: user-selector was not excluding currentUser (#9266)

FIX: user-selector was not excluding currentUser (#9266)

concat doesn’t mutate the variable so it has to be assigned.

diff --git a/app/assets/javascripts/discourse/components/user-selector.js b/app/assets/javascripts/discourse/components/user-selector.js
index 3d796d0..d362c60 100644
--- a/app/assets/javascripts/discourse/components/user-selector.js
+++ b/app/assets/javascripts/discourse/components/user-selector.js
@@ -72,7 +72,7 @@ export default TextField.extend({
       let usernames = single ? [] : selected;
 
       if (currentUser && excludeCurrentUser) {
-        usernames.concat([currentUser.username]);
+        usernames = usernames.concat([currentUser.username]);
       }
 
       return usernames.concat(this.excludedUsernames || []);

GitHub sha: 2501c0cd

This commit appears in #9266 which was approved by eviltrout. It was merged by jjaffeux.