Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kemzeb opened this issue Jan 7, 2025 · 4 comments · Fixed by #33136
Closed

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

kemzeb opened this issue Jan 7, 2025 · 4 comments · Fixed by #33136
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@kemzeb
Copy link
Contributor

kemzeb commented Jan 7, 2025

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

@kemzeb kemzeb added type/bug topic/ui Change the appearance of the Gitea UI labels Jan 7, 2025
@kemzeb
Copy link
Contributor Author

kemzeb commented Jan 7, 2025

I should note that I originally discovered this on my private instance, which is at version 1.23.0+rc0-43-ge10d222434 (I'm using docker image 1.23-nightly).

@lunny lunny added this to the 1.23.0 milestone Jan 7, 2025
@wxiaoguang

This comment was marked as outdated.

@wxiaoguang
Copy link
Contributor

-> Refactor HTMLFormat, update chroma render, fix js error #33136

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jan 8, 2025

And this one for 1.23: Fix git remote error check, fix dependencies, fix js error #33133

@lunny lunny closed this as completed in 386c1ed Jan 8, 2025
lunny pushed a commit that referenced this issue Jan 8, 2025
…#33133)

And update some dependencies to fix bugs.

Backport  #33129, #33136

Fix #32889
Fix #33141
Fix #33139

---------

Co-authored-by: yp05327 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants