Skip to content

Commit

Permalink
problem: name is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
gsovereignty committed Nov 23, 2023
1 parent fae3cc9 commit 029c8b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/stores/nostrocket_state/hard_state/rockets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,14 @@ export function HandleRocketIgnitionNote(
}

export function nameIsUnique(name: string, state?: Nostrocket): boolean {
if (!name) {
return false
}
if (!state) {
state = get(consensusTipState);
}
for (let [s, r] of state.RocketMap) {
if (r.Name.toLowerCase() == name.toLowerCase()) {
if (r.Name.toLowerCase() == name?.toLowerCase()) {
return false;
}
}
Expand Down

0 comments on commit 029c8b0

Please sign in to comment.