Merge remote-tracking branch 'origin/master' into eliminate-gst-from-app-paths

This commit is contained in:
Janne Savolainen committed 2022-01-10 17:13:20 +02:00
commit e1a6d4c4a9
56 files changed
+379 -224

No files matched your search

+8 -1
View File
@@ -30,6 +30,9 @@ import { ensureObjectSelfLink, IKubeApiQueryParams, KubeApi } from "./kube-api";
import { parseKubeApi } from "./kube-api-parse";
import type { KubeJsonApiData } from "./kube-json-api";
import type { RequestInit } from "node-fetch";
// BUG: https://github.com/mysticatea/abort-controller/pull/22
// eslint-disable-next-line import/no-named-as-default
import AbortController from "abort-controller";
import type { Patch } from "rfc6902";
@@ -469,7 +472,9 @@ export abstract class KubeObjectStore<T extends KubeObject> extends ItemStore<T>
switch (type) {
case "ADDED":
case "MODIFIED":
// falls through
case "MODIFIED": {
const newItem = new this.api.objectConstructor(object);
if (!item) {
@@ -477,7 +482,9 @@ export abstract class KubeObjectStore<T extends KubeObject> extends ItemStore<T>
} else {
items[index] = newItem;
}
break;
}
case "DELETED":
if (item) {
items.splice(index, 1);