mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
revert changing selectedNamespaces default value
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f4ce27dc0d
commit
3dcfe4c7cf
@ -5,7 +5,7 @@ import { Namespace, namespacesApi } from "../../api/endpoints/namespaces.api";
|
|||||||
import { createPageParam } from "../../navigation";
|
import { createPageParam } from "../../navigation";
|
||||||
import { apiManager } from "../../api/api-manager";
|
import { apiManager } from "../../api/api-manager";
|
||||||
|
|
||||||
const selectedNamespaces = createStorage<string[]>("selected_namespaces", []);
|
const selectedNamespaces = createStorage<string[] | undefined>("selected_namespaces", undefined);
|
||||||
|
|
||||||
export const namespaceUrlParam = createPageParam<string[]>({
|
export const namespaceUrlParam = createPageParam<string[]>({
|
||||||
name: "namespaces",
|
name: "namespaces",
|
||||||
|
|||||||
@ -134,7 +134,8 @@ export class StorageHelper<T> {
|
|||||||
|
|
||||||
set(value: T) {
|
set(value: T) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
this.reset();
|
// This cannot use recursion because defaultValue might be null or undefined
|
||||||
|
this.data.set(this.defaultValue);
|
||||||
} else {
|
} else {
|
||||||
this.data.set(value);
|
this.data.set(value);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user