perf: use logical assignments instead of if statements (#6693)

This commit is contained in:
Almeida
2021-10-03 13:59:57 +01:00
committed by GitHub
parent 9eb9591473
commit e9daa31eaf
9 changed files with 17 additions and 21 deletions

View File

@@ -294,7 +294,7 @@ class GuildChannel extends Channel {
* .catch(console.error);
*/
async edit(data, reason) {
if (data.parent) data.parent = this.client.channels.resolveId(data.parent);
data.parent &&= this.client.channels.resolveId(data.parent);
if (typeof data.position !== 'undefined') {
const updatedChannels = await Util.setPosition(