File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/discord.js/src/managers Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -299,11 +299,13 @@ class GuildMemberManager extends CachedManager {
299
299
}
300
300
data . roles &&= data . roles . map ( role => ( role instanceof Role ? role . id : role ) ) ;
301
301
302
- data . communication_disabled_until =
303
- // eslint-disable-next-line eqeqeq
304
- data . communicationDisabledUntil != null
305
- ? new Date ( data . communicationDisabledUntil ) . toISOString ( )
306
- : data . communicationDisabledUntil ;
302
+ if ( typeof data . communicationDisabledUntil !== 'undefined' ) {
303
+ data . communication_disabled_until =
304
+ // eslint-disable-next-line eqeqeq
305
+ data . communicationDisabledUntil != null
306
+ ? new Date ( data . communicationDisabledUntil ) . toISOString ( )
307
+ : data . communicationDisabledUntil ;
308
+ }
307
309
308
310
let endpoint ;
309
311
if ( id === this . client . user . id ) {
You can’t perform that action at this time.
0 commit comments