FIX: correctly excludes current user in user-chooser (#8928)

This commit is contained in:
Joffrey JAFFEUX 2020-02-11 20:41:18 +01:00 committed by GitHub
parent 3e89774908
commit adbff5835d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ export default MultiSelectComponent.extend({
let usernames = makeArray(this.value); let usernames = makeArray(this.value);
if (this.currentUser && options.excludeCurrentUser) { if (this.currentUser && options.excludeCurrentUser) {
usernames.concat([this.currentUser.username]); usernames = usernames.concat([this.currentUser.username]);
} }
return usernames.concat(options.excludedUsernames || []); return usernames.concat(options.excludedUsernames || []);