Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
fix a bug to send date
Browse files Browse the repository at this point in the history
  • Loading branch information
XadillaX committed Aug 25, 2015
1 parent e12f795 commit 5e14598
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/isocket.js
Expand Up @@ -11,11 +11,21 @@ var msgpack = require("msgpack");
var helper = require("./helper");

var emptyFunc = function(){};

/**
* _formatSendBody
* @param {*} _body the body to be formatted
* @return {*} the body formatted
*/
var _formatSendBody = function(_body) {
if(undefined === _body || null === _body) {
return null;
}

if(_body instanceof Date || _body instanceof Error) {
return _body;
}

if(util.isArray(_body)) {
return _body.map(function(body) {
return _formatSendBody(body);
Expand Down

0 comments on commit 5e14598

Please sign in to comment.