Add better logging

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-12-09 14:51:42 -05:00
1 parent c429509a5b
commit 33b95970df
1 file changed
+8 -1
@@ -37,11 +37,18 @@ export class ClusterFrameHandler {
@action
public initView(clusterId: ClusterId) {
const cluster = this.dependencies.getClusterById(clusterId);
if (!cluster) {
this.dependencies.logger.warn(`[LENS-VIEW]: not initializing view; unknown clusterId="${clusterId}"`);
return;
}
const parentElem = document.getElementById("lens-views");
assert(parentElem, "DOM with #lens-views must be present");
if (!cluster || this.views.has(clusterId)) {
if (this.views.has(clusterId)) {
return;
}