Improve metadata value conversion

The current approach has issues with numbers of type long
This commit is contained in:
schroda
2025-05-17 23:17:36 +02:00
parent 822e47084e
commit bf90d95266
3 changed files with 97 additions and 90 deletions

View File

@@ -37,7 +37,7 @@ const getMetadataValueFrom = <Key extends AppMetadataKeys, Value extends Allowed
return defaultValue;
}
return convertValueFromMetadata(metadata[getMetadataKey(key, prefixes)]);
return convertValueFromMetadata(key, metadata[getMetadataKey(key, prefixes)]);
};
export function getMetadataFrom<METADATA extends Partial<Metadata<AppMetadataKeys, AllowedMetadataValueTypes>>>(