1
0

implemented debounce for name variant updates

This commit is contained in:
lotte
2019-11-14 09:56:53 +01:00
parent 190203cb48
commit 4a7c7a61f1
11 changed files with 97 additions and 45 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) => {