diff --git a/packages/ddp-client/common/livedata_connection.js b/packages/ddp-client/common/livedata_connection.js index 395da44ac9..3a36227272 100644 --- a/packages/ddp-client/common/livedata_connection.js +++ b/packages/ddp-client/common/livedata_connection.js @@ -850,7 +850,17 @@ export class Connection { } // If we added it to the first block, send it out now. - if (self._outstandingMethodBlocks.length === 1) methodInvoker.sendMessage(); + if (self._outstandingMethodBlocks.length === 1) { + if (callback && future) { + // Ensure the method message after the result of the method ran in the client. + future = new Promise((resolve) => { + methodInvoker.sendMessage(); + resolve(); + }); + } else { + methodInvoker.sendMessage(); + } + } // If we're using the default callback on the server, // block waiting for the result.