Skip to content

Commit

Permalink
fix: filter empty string if there's only metadata in a built Metadata…
Browse files Browse the repository at this point in the history
…bleCustomId
  • Loading branch information
Amgelo563 committed Feb 13, 2024
1 parent 1e0c9c7 commit 126d334
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/customId/MetadatableCustomIdBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class MetadatableCustomIdBuilder extends CustomIdBuilder {
const tokens = string.split(separator);
if (!tokens.length) return null;

const [data, ...extraTokens] = tokens;
const [data, ...extraTokens] = tokens.length === 2 ? [tokens[0]] : tokens;
const [namespace, objectId, ...metadata] = data.split(dataSeparator);
if (!namespace || !objectId) return null;

Expand Down

0 comments on commit 126d334

Please sign in to comment.