add context to Parse.Object.save (#6626)

* added failing test

* added parsing of context in REST save request

* undo lint changes
This commit is contained in:
Manuel
2020-04-28 20:36:46 +02:00
committed by GitHub
parent 61546aad9a
commit 288e746888
2 changed files with 18 additions and 0 deletions

View File

@@ -53,6 +53,11 @@ function RestWrite(
}
if (!query) {
// Parse context
if (data._context && data._context instanceof Object) {
this.context = data._context;
delete data._context;
}
if (this.config.allowCustomObjectId) {
if (
Object.prototype.hasOwnProperty.call(data, 'objectId') &&