Skip to content

JS promise rejection when adding a '#' to a project's description #33139

Closed
@kemzeb

Description

@kemzeb

Description

This is currently reproducible in the Gitea demo instance. To do so:

  • Create a new user/org/repo project
  • In the project description, add a hashtag ('#')
  • You will get a JavaScript promise rejection: Cannot read properties of undefined (reading 'startsWith'). Open browser console to see more details. error

The console output:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'startsWith')
    at je (utils.ts:43:34)
    at TextExpander.ts:11:49
    at new Promise (<anonymous>)
    at TextExpander.ts:9:72
    at sg (index.mjs:54:19)
    at S (index.mjs:15:22)
    at index.mjs:38:58

I get the same error on both Brave and Firefox.

It does not seem to have any negative impact to creating/editing projects.

Screenshots

Screenshot 2025-01-07 at 10 03 18 AM

Gitea Version

1.24.0+dev-118-g4237736029

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

No response

Browser Version

Brave v1.73.104

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions