1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Return KubeObject for successfully created unknown resources (#617)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-08-20 10:04:12 +03:00 committed by GitHub
parent 5670312c47
commit f958e1c760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,11 @@ export const resourceApplierApi = {
.then(data => {
const items = data.map(obj => {
const api = apiManager.getApi(obj.metadata.selfLink);
if (api) {
return new api.objectConstructor(obj);
} else {
return new KubeObject(obj)
}
});
return items.length === 1 ? items[0] : items;
});