Skip to content

fix : added fallback heading creation when project heading not found in modal.js - #1821

Closed
tmdeveloper007 wants to merge 1 commit into
steam-bell-92:mainfrom
tmdeveloper007:pr1816
Closed

fix : added fallback heading creation when project heading not found in modal.js#1821
tmdeveloper007 wants to merge 1 commit into
steam-bell-92:mainfrom
tmdeveloper007:pr1816

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

Added a fallback heading creation in web-app/js/modules/modal.js inside the openProjectSafe function. If no heading element (h2, h3, .pet-title, or title/header class) is found in the project content, a synthetic h2 heading is now created and prepended to the content before the info button is injected.

File changed: web-app/js/modules/modal.js

Changes Made

  • Added a third !firstHeading check after the two existing heading searches
  • Creates an h2 element with a PascalCase version of the project name
  • Prepends the heading to .project-content before the info button injection

Impact it Made

  • Info button is always injected regardless of project HTML structure
  • Users can always access project instructions for projects without headings
  • No visual regression for projects that already have headings

Closes #1816

Note

Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix : add fallback for missing project heading before info button injection in modal.js

2 participants