keep only items from non-loaded namespaces

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen committed 2021-02-11 08:16:43 +02:00
1 parent 819b404fc0
commit 71c2bc69d9
1 file changed
+2 -2
+2 -2
View File
@@ -178,10 +178,10 @@ export abstract class KubeObjectStore<T extends KubeObject = any> extends ItemSt
// update existing items
if (!replace) {
const partialIds = partialItems.map(item => item.getId());
const namespaces = partialItems.map(item => item.getNs());
items = [
...this.items.filter(existingItem => !partialIds.includes(existingItem.getId())),
...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),
...partialItems,
];
}