Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/handle undefined in decode data source (#2013)

Thomas Kaul144b6b221181
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0b160b199..65331f5382 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a link to manage the benchmarks to the benchmark comparator
- Added support for localized routes
+### Fixed
+
+- Fixed an issue in the data source transformation
+
## 1.272.0 - 2023-05-26
### Added
diff --git a/libs/common/src/lib/helper.ts b/libs/common/src/lib/helper.ts
index d6da4ed945..bc02acbe63 100644
--- a/libs/common/src/lib/helper.ts
+++ b/libs/common/src/lib/helper.ts
@@ -15,7 +15,11 @@ export function capitalize(aString: string) {
}
export function decodeDataSource(encodedDataSource: string) {
- return Buffer.from(encodedDataSource, 'hex').toString();
+ if (encodedDataSource) {
+ return Buffer.from(encodedDataSource, 'hex').toString();
+ }
+
+ return undefined;
}
export function downloadAsFile({