Use nullish coalescing operator (#11294)

This commit is contained in:
woxtu 2023-07-16 14:21:05 +09:00 committed by GitHub
parent 545371011a
commit 96cde67b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -256,7 +256,7 @@ export default function(props: {
case 'mention': {
return [h(MkMention, {
key: Math.random(),
host: (token.props.host == null && props.author && props.author.host != null ? props.author.host : token.props.host) || host,
host: (token.props.host == null && props.author && props.author.host != null ? props.author.host : token.props.host) ?? host,
username: token.props.username,
})];
}