From 186a55a756720aed40fdbbb3592d493da6182f80 Mon Sep 17 00:00:00 2001 From: Omair Vaiyani Date: Wed, 4 Sep 2019 17:09:59 +0100 Subject: [PATCH] fix(RestWrite): make method async as expected in usage The method `createSessionToken` in RestWrite.js is assumed to always return a promise (see Line 961 in `handleFollowUp`) - this was throwing an error `cannot read 'then' of undefined`. This simply one word change fixes that error. --- src/RestWrite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RestWrite.js b/src/RestWrite.js index 083254ed4b..f1d8aafec8 100644 --- a/src/RestWrite.js +++ b/src/RestWrite.js @@ -872,7 +872,7 @@ RestWrite.prototype.createSessionTokenIfNeeded = function() { return this.createSessionToken(); }; -RestWrite.prototype.createSessionToken = function() { +RestWrite.prototype.createSessionToken = async function() { // cloud installationId from Cloud Code, // never create session tokens from there. if (this.auth.installationId && this.auth.installationId === 'cloud') {