remove check for removed spaceapi item "api"
remove check for presence of "api" item in the spaceapi response, as this item was removed in spaceapi v14
This commit is contained in:
parent
cf305a3855
commit
3b514a8262
|
@ -44,10 +44,6 @@ function updateRoomState(openState, lastChangeTimestamp) {
|
||||||
function parseResponse(apiJson) {
|
function parseResponse(apiJson) {
|
||||||
console.debug('SpaceAPI got:', apiJson)
|
console.debug('SpaceAPI got:', apiJson)
|
||||||
|
|
||||||
if (typeof apiJson.api === "undefined") {
|
|
||||||
console.error("SpaceAPI JSON invalid: 'api' item not present")
|
|
||||||
return [null, null]
|
|
||||||
}
|
|
||||||
if (typeof apiJson.state === "undefined") {
|
if (typeof apiJson.state === "undefined") {
|
||||||
console.error("SpaceAPI JSON invalid: 'state' item not present")
|
console.error("SpaceAPI JSON invalid: 'state' item not present")
|
||||||
return [null, null]
|
return [null, null]
|
||||||
|
|
Loading…
Reference in a new issue