intermediate bug commit

This commit is contained in:
lotte
2018-09-26 15:31:26 +02:00
parent bae69aef97
commit 8c05ed86ef
9 changed files with 69 additions and 27 deletions

View File

@@ -91,7 +91,7 @@ export class ObjectCacheService {
getBySelfLink<T extends NormalizedObject>(selfLink: string): Observable<T> {
return this.getEntry(selfLink).pipe(
map((entry: ObjectCacheEntry) => {
const flatPatch: Operation[] = [].concat(...entry.patches);
const flatPatch: Operation[] = [].concat(...entry.patches.map((patch) => patch.operations));
const patchedData = applyPatch(entry.data, flatPatch).newDocument;
return Object.assign({}, entry, { data: patchedData });
}