http: fix json rpc id handling. see #159.

This commit is contained in:
Christopher Jeffrey 2017-03-12 23:44:04 -07:00
parent 604362effd
commit 667b0e746d
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -550,10 +550,7 @@ HTTPServer.prototype._init = function _init() {
enforce(Array.isArray(cmd.params), 'Params must be an array.');
if (!cmd.id)
cmd.id = 0;
enforce(typeof cmd.id === 'number', 'ID must be a number.');
enforce(!cmd.id || typeof cmd.id !== 'object', 'Invalid ID.');
}
for (i = 0; i < cmds.length; i++) {