From 75fd2f42f30da9ed096066ed9a33b0242e4400d8 Mon Sep 17 00:00:00 2001 From: Heath Morrison Date: Mon, 25 Apr 2016 01:11:05 +0300 Subject: [PATCH] Small logic cleanup --- lib/remote-connector.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/remote-connector.js b/lib/remote-connector.js index 39f8514..b6024bd 100644 --- a/lib/remote-connector.js +++ b/lib/remote-connector.js @@ -101,11 +101,11 @@ function createProxyMethod(Model, remotes, remoteMethod) { if (remoteMethod.isStatic) { remotes.invoke(remoteMethod.stringName, args, callback); - return callback.promise; + } else { + var ctorArgs = [this.id]; + remotes.invoke(remoteMethod.stringName, ctorArgs, args, callback); } - var ctorArgs = [this.id]; - remotes.invoke(remoteMethod.stringName, ctorArgs, args, callback); return callback.promise; }