genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
402 stars 157 forks source link

Fix error with Pepper1 db when lang is not an array. #90

Closed Bounz closed 9 years ago

Bounz commented 9 years ago

Sometimes there is only one language in Pepper1 db file, for example https://github.com/genielabs/HomeGenie/blob/master/BaseFiles/Common/html/ext/zwave/pepper1db/010F_0B00_1001.json#L56. In such cases the exception was raised on call to zproperty.lang.filter() because zproperty.lang was not an array. Also I've added a check in Pepper1Db_getConfigValue function if passed parameter is undefined as I catched exceptions in this function.