fix(RestWrite): make method async as expected in usage (#6025)

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.
This commit is contained in:
Omair Vaiyani
2019-09-04 17:46:35 +01:00
committed by Antonio Davi Macedo Coelho de Castro
parent 6497ec72ed
commit 618fe37c5a

View File

@@ -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') {