Skip to content

Commit

Permalink
fix: Typing/filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
elwinschmitz committed Oct 16, 2024
1 parent 71f9420 commit a6d7fce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/services/logging.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ export class LoggingService {
}

private parseMatomoInfo(connectionString: string | undefined) {
const properties = ['id', 'api', 'sdk'];
const connection: { id?: string; api?: string; sdk?: string } = {};
if (typeof connectionString === 'string') {
const allParts = connectionString.split(';');
allParts.forEach((part: string) => {
const [key, value] = part.split('=');
if (key in connection) {
if (properties.includes(key)) {
connection[key as keyof typeof connection] = value;
}
});
Expand Down

0 comments on commit a6d7fce

Please sign in to comment.