1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-27 13:49:10 +02:00
This commit is contained in:
Thomas Heartman 2025-07-16 13:19:45 +02:00
parent 2e0a05d078
commit de43fba588

View File

@ -33,7 +33,7 @@ const mapRow = (row): IClientInstance => ({
});
const mapToDb = (client: INewClientInstance) => {
const initialMap = {
const mapped = {
app_name: client.appName,
instance_id: client.instanceId,
sdk_version: client.sdkVersion,
@ -43,14 +43,14 @@ const mapToDb = (client: INewClientInstance) => {
environment: client.environment,
};
Object.keys(initialMap).forEach((k) => {
if (initialMap[k] === undefined) {
Object.keys(mapped).forEach((k) => {
if (mapped[k] === undefined) {
// not using !temp[k] to allow false and null values to get through
delete initialMap[k];
delete mapped[k];
}
});
return initialMap;
return mapped;
};
export default class ClientInstanceStore implements IClientInstanceStore {