mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Prevent unit tests from failing because of non-standard method of HTML-element not present in js-dom
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
parent
9a5a210ed3
commit
836c2c1dbf
@ -57,9 +57,9 @@ const NonInjectedLogsDockTab = observer(({ className, tab, model, subscribeStore
|
||||
setTimeout(() => {
|
||||
const overlay = document.querySelector(".PodLogs .list span.active");
|
||||
|
||||
if (typeof overlay?.scrollIntoViewIfNeeded === "function") {
|
||||
overlay.scrollIntoViewIfNeeded();
|
||||
}
|
||||
if (!overlay) return;
|
||||
// Note: .scrollIntoViewIfNeeded() is non-standard and thus not present in js-dom.
|
||||
overlay?.scrollIntoViewIfNeeded?.();
|
||||
}, 100);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user