Skip to content

Commit

Permalink
perf: use logical assignments instead of if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Sep 25, 2021
1 parent 5261fcd commit d18b8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/websocket/handlers/READY.js
Expand Up @@ -7,7 +7,7 @@ module.exports = (client, { d: data }, shard) => {
if (client.user) {
client.user._patch(data.user);
} else {
if (!ClientUser) ClientUser = require('../../../structures/ClientUser');
ClientUser ??= require('../../../structures/ClientUser');
client.user = new ClientUser(client, data.user);
client.users.cache.set(client.user.id, client.user);
}
Expand Down

0 comments on commit d18b8db

Please sign in to comment.