diff --git a/exec/load/json-db.js b/exec/load/json-db.js index fd3d375dbbcdf8aed1087047a26bec0668ae4d58..65665294dc1b5ca3394ac83b6dd867c43d38712f 100644 --- a/exec/load/json-db.js +++ b/exec/load/json-db.js @@ -236,7 +236,7 @@ function JSONdb (fileName) { /* if this client has this record locked */ else if(record.info.lock[client.id] && record.info.lock[client.id].type == locks.WRITE) { - if(record.data[record.child_name] instanceof Array) { + if(record.data[record.child_name] instanceof Array) send_packet(client,record.data[record.child_name].pop(),"RESPONSE"); else this.error(client,errors.NON_ARRAY); @@ -258,7 +258,7 @@ function JSONdb (fileName) { /* if this client has this record locked */ else if(record.info.lock[client.id] && record.info.lock[client.id].type == locks.WRITE) { - if(record.data[record.child_name] instanceof Array) { + if(record.data[record.child_name] instanceof Array) send_packet(client,record.data[record.child_name].shift(),"RESPONSE"); else this.error(client,errors.NON_ARRAY);