Skip to content

FOLLOW-UP: Remove redundant hashId guard in link-interceptor #90

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #86.

Source PR: #86
PR Title: feat: hash-driven element activation for deep-linking
Suggested by: @claude[bot]

Task Description

In dom/link-interceptor.ts, the hashId && guard is redundant:

if (target.pathname === window.location.pathname && target.search === window.location.search && target.hash) {
  const hashId = target.hash.slice(1);
  if (hashId && isHashLinkTarget(hashId)) {  // hashId && is redundant

target.hash.slice(1) can only be empty if target.hash is empty, which is already excluded by the outer target.hash check. The hashId && guard can be safely removed.

Priority

Low


This issue was automatically created by prmonitor from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions