chore: lint + bump deps

This commit is contained in:
liyasthomas
2021-11-04 18:23:50 +05:30
parent ad76d100ee
commit 9e74a8c2e7
32 changed files with 1248 additions and 1265 deletions

View File

@@ -190,20 +190,17 @@ function setupEnvironmentsPersistence() {
}
function setupSelectedEnvPersistence() {
const selectedEnvIndex =
pipe(
// Value from local storage can be nullable
O.fromNullable(
window.localStorage.getItem("selectedEnvIndex")
),
O.map(parseInt), // If not null, parse to integer
O.chain(
O.fromPredicate(
Number.isInteger // Check if the number is proper int (not NaN)
)
),
O.getOrElse(() => -1) // If all the above conditions pass, we are good, else set default value (-1)
)
const selectedEnvIndex = pipe(
// Value from local storage can be nullable
O.fromNullable(window.localStorage.getItem("selectedEnvIndex")),
O.map(parseInt), // If not null, parse to integer
O.chain(
O.fromPredicate(
Number.isInteger // Check if the number is proper int (not NaN)
)
),
O.getOrElse(() => -1) // If all the above conditions pass, we are good, else set default value (-1)
)
setCurrentEnvironment(selectedEnvIndex)