mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-3651 fix: container resource key validation (#1956)
Co-authored-by: EvgeniaBzzz <139753579+EvgeniaBzzz@users.noreply.github.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
resourceKeyList,
|
||||
ResourceKeyUtils,
|
||||
} from '@cloudbeaver/core-sdk';
|
||||
import { isNull } from '@cloudbeaver/core-utils';
|
||||
|
||||
import { ConnectionInfoActiveProjectKey, ConnectionInfoResource } from './ConnectionInfoResource';
|
||||
import type { IConnectionInfoParams } from './IConnectionsResource';
|
||||
@@ -124,7 +125,7 @@ export class ContainerResource extends CachedMapResource<ObjectContainerParams,
|
||||
typeof key === 'object' &&
|
||||
typeof key.projectId === 'string' &&
|
||||
['string'].includes(typeof key.connectionId) &&
|
||||
['string', 'undefined'].includes(typeof key.catalogId)
|
||||
(['string', 'undefined'].includes(typeof key.catalogId) || isNull(key.catalogId))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,8 +43,9 @@ export class TempMap<TKey, TValue> implements Map<TKey, TValue> {
|
||||
this.entriesTemp = cacheValue();
|
||||
this.valuesTemp = cacheValue();
|
||||
|
||||
makeObservable<this, 'deleted'>(this, {
|
||||
makeObservable<this, 'deleted' | 'scheduleFlush'>(this, {
|
||||
deleted: observable.shallow,
|
||||
scheduleFlush: action,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user