1
0

Added name variant dialog

This commit is contained in:
lotte
2019-11-14 16:00:48 +01:00
parent 4a7c7a61f1
commit c2ae71b1b8
9 changed files with 126 additions and 17 deletions

View File

@@ -99,13 +99,13 @@ export class ObjectCacheService {
getObjectBySelfLink<T extends CacheableObject>(selfLink: string): Observable<NormalizedObject<T>> {
return this.getBySelfLink(selfLink).pipe(
map((entry: ObjectCacheEntry) => {
// if (isNotEmpty(entry.patches)) {
// const flatPatch: Operation[] = [].concat(...entry.patches.map((patch) => patch.operations));
// const patchedData = applyPatch(entry.data, flatPatch, undefined, false).newDocument;
// return Object.assign({}, entry, { data: patchedData });
// } else {
if (isNotEmpty(entry.patches)) {
const flatPatch: Operation[] = [].concat(...entry.patches.map((patch) => patch.operations));
const patchedData = applyPatch(entry.data, flatPatch, undefined, false).newDocument;
return Object.assign({}, entry, { data: patchedData });
} else {
return entry;
// }
}
}
),
map((entry: ObjectCacheEntry) => {