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

refactor to use getBoolean

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-09-27 17:55:38 +03:00
parent 9cbb8585c0
commit 6e46668cbe

View File

@ -47,11 +47,7 @@ const followParam = "follow";
export function isLongRunningRequest(reqUrl: string) {
const url = new URL(reqUrl, "http://localhost");
if (url.searchParams.has(watchParam) && getBoolean(url.searchParams, watchParam)) {
return true;
}
if (url.searchParams.has(followParam) && getBoolean(url.searchParams, followParam)) {
if (getBoolean(url.searchParams, watchParam) || getBoolean(url.searchParams, followParam)) {
return true;
}