Revert accidental breaking change in Extension API (#4904)

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne SavolainenandMikko Aspiala authored and GitHub committed 2022-02-23 13:26:14 +02:00
1 parent 12a6bd8512
commit 81819dbbe9
2 files changed
+7 -6

No files matched your search

+2 -2
View File
@@ -312,14 +312,14 @@ export abstract class KubeObjectStore<T extends KubeObject> extends ItemStore<T>
return this.api.create(params, data);
}
create = async (params: { name: string; namespace?: string }, data?: Partial<T>): Promise<T> => {
async create(params: { name: string; namespace?: string }, data?: Partial<T>): Promise<T> {
const newItem = await this.createItem(params, data);
const items = this.sortItems([...this.items, newItem]);
this.items.replace(items);
return newItem;
};
}
private postUpdate(rawItem: KubeJsonApiData): T {
const newItem = new this.api.objectConstructor(rawItem);