Explorar o código

Change argument validation in Server#addService

murgatroid99 %!s(int64=8) %!d(string=hai) anos
pai
achega
9d68158d13
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/node/src/server.js

+ 1 - 1
src/node/src/server.js

@@ -728,7 +728,7 @@ var defaultHandler = {
  *     method implementation for the provided service.
  */
 Server.prototype.addService = function(service, implementation) {
-  if (!_.isObjectLike(service) || !_.isObjectLike(implementation)) {
+  if (!_.isObject(service) || !_.isObject(implementation)) {
     throw new Error('addService requires two objects as arguments');
   }
   if (_.keys(service).length === 0) {