Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Commit

Permalink
[BUG-FIX] Booleans are now properly validated
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Feb 7, 2017
1 parent 0cbca65 commit 5e9d830
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- dataProviders renamed to Providers

### Fixed
- Fixed validateData Booleans.
- Fixed Reloading Events not loading new events correctly.
- Fixed Typo in transfer command
- Fixed Usage not working properly with selective
Expand Down
2 changes: 1 addition & 1 deletion functions/validateData.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = (data, properties, values) => {
}
break;
case "bool":
if (!["true", "false", true, false, 1, 0].includes(v.toLowerCase())) {
if (!["true", "false", true, false, 1, 0].includes(!!JSON.parse(v))) {
throw new Error(`at value #${i + 1}: The 'bool' type must be 'true(1)' or 'false(0)', got '${v}`);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "komada",
"version": "0.17.4",
"version": "0.17.5",
"author": "Evelyne Lachance",
"description": "Komada: Croatian for 'pieces', is a modular bot system including reloading modules and easy to use custom commands.",
"main": "app.js",
Expand Down

0 comments on commit 5e9d830

Please sign in to comment.