Skip to content

Commit

Permalink
fix: default to timestamp as d for names that can't be slugified
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiricha committed May 15, 2024
1 parent a05b64c commit cd34786
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/badges/ui/new-badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export default function NewBadge() {
}, []);

useEffect(() => {
const d = slugify(name);
const slug = slugify(name);
const d = slug.length > 0 ? slug : String(Date.now());
const ev = {
pubkey: session?.pubkey || "",
kind: NDKKind.BadgeDefinition,
Expand Down

0 comments on commit cd34786

Please sign in to comment.