diff --git a/packages/ddp-client/common/livedata_connection.js b/packages/ddp-client/common/livedata_connection.js index 8f87029185..2bb18d4ab0 100644 --- a/packages/ddp-client/common/livedata_connection.js +++ b/packages/ddp-client/common/livedata_connection.js @@ -614,7 +614,7 @@ export class Connection { stubOptions.stubReturnValue = DDP._CurrentMethodInvocation .withValue(invocation, stubInvocation); if (Meteor._isPromise(stubOptions.stubReturnValue)) { - console.warn( + Meteor._debug( `Method ${name}: Calling a method that has an async method stub with call/apply can lead to unexpected behaviors. Use callAsync/applyAsync instead.` ); } diff --git a/packages/meteor/dynamics_browser.js b/packages/meteor/dynamics_browser.js index 6436a3f9b9..ea1bbbc524 100644 --- a/packages/meteor/dynamics_browser.js +++ b/packages/meteor/dynamics_browser.js @@ -35,6 +35,10 @@ EVp.getOrNullIfOutsideFiber = function () { * @returns {any} The return value of the function */ EVp.withValue = function (value, func) { + // WARNING: Do not change the behavior of this function. + // If you compare this function to it's version in the server-side, you'll see that there we handle async results. + // In the client we don't need to do this. If we try to, it can lead to problems like this: + // https://github.com/meteor/meteor/pull/13198#issuecomment-2181254734/. var saved = currentValues[this.slot]; try {