Skip to content

Commit afa6c13

Browse files
omairvaiyanidavimacedo
authored andcommitted
fix(RestWrite): make method async as expected in usage (parse-community#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.
1 parent 9865f02 commit afa6c13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RestWrite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ RestWrite.prototype.createSessionTokenIfNeeded = function() {
872872
return this.createSessionToken();
873873
};
874874

875-
RestWrite.prototype.createSessionToken = function() {
875+
RestWrite.prototype.createSessionToken = async function() {
876876
// cloud installationId from Cloud Code,
877877
// never create session tokens from there.
878878
if (this.auth.installationId && this.auth.installationId === 'cloud') {

0 commit comments

Comments
 (0)