@kravc/dos 1.11.9 → 1.11.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Document.js +4 -9
package/package.json
CHANGED
package/src/Document.js
CHANGED
|
@@ -207,14 +207,12 @@ class Document extends Component {
|
|
|
207
207
|
|
|
208
208
|
/* NOTE: ensure that document to be updated exists and save it in the
|
|
209
209
|
context so can be referenced in the after action helper */
|
|
210
|
-
if (originalDocument) {
|
|
211
|
-
this._extendWithPartition(context, query)
|
|
212
|
-
|
|
213
|
-
} else {
|
|
210
|
+
if (!originalDocument) {
|
|
214
211
|
originalDocument = await this.read(context, query)
|
|
215
|
-
|
|
216
212
|
}
|
|
217
213
|
|
|
214
|
+
this._extendWithPartition(context, query)
|
|
215
|
+
|
|
218
216
|
const updatedItem = await this._update(query, mutation)
|
|
219
217
|
|
|
220
218
|
const document = new this(context, updatedItem)
|
|
@@ -249,11 +247,8 @@ class Document extends Component {
|
|
|
249
247
|
/* NOTE: ensure that document to be removed exists and save it in the
|
|
250
248
|
context so can be referenced in the after action helper */
|
|
251
249
|
const originalDocument = await this.read(context, query)
|
|
252
|
-
const hasQueryPartition = !!query.partition
|
|
253
250
|
|
|
254
|
-
|
|
255
|
-
this._extendWithPartition(context, query)
|
|
256
|
-
}
|
|
251
|
+
this._extendWithPartition(context, query)
|
|
257
252
|
|
|
258
253
|
await this._delete(query, context)
|
|
259
254
|
|