test websocket message hooks

This commit is contained in:
guox191
2019-04-09 15:27:08 +08:00
parent 04c46a8db6
commit 2631ca6538
5 changed files with 110 additions and 23 deletions

View File

@@ -6,7 +6,7 @@ const color = require('colorful');
function _isDeepEqual(source, target) {
// if the objects are Array
if (source.constructor === Array && target.constructor === Array) {
if (Array.isArray(source) && Array.isArray(target)) {
if (source.length !== target.length) {
return false;
}