Skip to content

Commit

Permalink
0.4.13: Fix checkCharacteristics
Browse files Browse the repository at this point in the history
  • Loading branch information
mhabedinpour committed Jan 9, 2018
1 parent 9c790dc commit bfaaca1
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 39 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "has-node",
"version": "0.4.12",
"version": "0.4.13",
"description": "Homekit Accessory Server",
"main": "app.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/predefinedTypes/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ for (const service of data.Services) {
let requiredCharacteristics = ${undefinedOrArray(service.RequiredCharacteristics, true)};
let optionalCharacteristics = ${undefinedOrArray(service.OptionalCharacteristics, true)};
if (!checkCharacteristics)
if (!checkCharacteristics) {
for (let characteristic of characteristics)
service.addCharacteristic(characteristic);
return service;
}
for (let type of requiredCharacteristics) {
let OK = false;
Expand Down
Loading

0 comments on commit bfaaca1

Please sign in to comment.