mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix warning hover text formatting
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
1963dde971
commit
468205bae2
@ -9,7 +9,7 @@ import React from "react";
|
|||||||
import { computed, observable, reaction } from "mobx";
|
import { computed, observable, reaction } from "mobx";
|
||||||
import { disposeOnUnmount, observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import type { Disposer } from "../../utils";
|
import type { Disposer } from "../../utils";
|
||||||
import { cssNames, isDefined } from "../../utils";
|
import { hasTypedProperty, isObject, isString, cssNames, isDefined } from "../../utils";
|
||||||
import type { KubeJsonApiDataFor, KubeObject } from "../../../common/k8s-api/kube-object";
|
import type { KubeJsonApiDataFor, KubeObject } from "../../../common/k8s-api/kube-object";
|
||||||
import type { ItemListLayoutProps } from "../item-object-list/list-layout";
|
import type { ItemListLayoutProps } from "../item-object-list/list-layout";
|
||||||
import { ItemListLayout } from "../item-object-list/list-layout";
|
import { ItemListLayout } from "../item-object-list/list-layout";
|
||||||
@ -64,6 +64,10 @@ const getLoadErrorMessage = (error: unknown): string => {
|
|||||||
return error.message;
|
return error.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isObject(error) && hasTypedProperty(error, "message", isString)) {
|
||||||
|
return error.message;
|
||||||
|
}
|
||||||
|
|
||||||
return `${error}`;
|
return `${error}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user