Skip to content

Commit 0186068

Browse files
VmMadmarc2332
andauthored
fix(explorer): avoid showing results of names with no linked address (#8404)
# Description of change When searching for a valid name with unset address, the explorer shows a blank result, which redirects to an invalid page if you click on it. ## Links to any relevant issues Fixes #8395 ## How the change has been tested - [ ] Basic tests (linting, compilation, formatting, unit/integration tests) - [ ] Patch-specific tests (correctness, functionality coverage) - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have checked that new and existing unit tests pass locally with my changes Co-authored-by: Marc Espin <[email protected]>
1 parent c1e4dd2 commit 0186068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/explorer/src/hooks/useSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const getResultsForAddress = async (
8282
if (iotaNamesClient && isNamesEnabled && isValidIotaName(query)) {
8383
const nameRecord = await iotaNamesClient.getNameRecord(query.toLowerCase());
8484

85-
if (!nameRecord) return null;
85+
if (!nameRecord || !nameRecord.targetAddress) return null;
8686

8787
return [
8888
{

0 commit comments

Comments
 (0)