fix: replace boolean function with ? : expressions

This commit is contained in:
Mar0xy 2023-09-25 23:33:45 +02:00
parent f586bead0f
commit f7c6f8ac3d
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828

View File

@ -225,7 +225,7 @@ export default class Misskey implements MegalodonInterface {
if (options) {
if (options.bot !== undefined) {
params = Object.assign(params, {
isBot: Boolean(options.bot)
isBot: options.bot.toString() === 'true' ? true : false
})
}
if (options.display_name) {
@ -240,7 +240,7 @@ export default class Misskey implements MegalodonInterface {
}
if (options.locked !== undefined) {
params = Object.assign(params, {
isLocked: Boolean(options.locked)
isLocked: options.locked.toString() === 'true' ? true : false
})
}
if (options.source) {