Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

fix: config set with number #998

Merged
merged 2 commits into from
May 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/config/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ module.exports = (send) => {
return callback(new Error('Invalid value type'))
}

if (typeof value === 'object') {
value = JSON.stringify(value)
opts = { json: true }
}

if (typeof value === 'boolean') {
value = value.toString()
opts = { bool: true }
} else if (typeof value !== 'string') {
value = JSON.stringify(value)
opts = { json: true }
}

send({
Expand Down