Skip to content

Commit

Permalink
fix(xo-server/remote#_unserialize): handle boolean enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-f committed Dec 19, 2023
1 parent 70e3ba1 commit 5a0cfd8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/xo-server/src/models/remote.mjs
Expand Up @@ -20,7 +20,10 @@ export class Remotes extends Collection {

_unserialize(remote) {
remote.benchmarks = parseProp('remote', remote, 'benchmarks')
remote.enabled = remote.enabled === 'true'

const { enabled } = remote
remote.enabled = typeof enabled === 'boolean' ? enabled : enabled === 'true'

remote.error = parseProp('remote', remote, 'error', remote.error)
}
}

0 comments on commit 5a0cfd8

Please sign in to comment.