diff options
author | silverwind <me@silverwind.io> | 2024-12-15 22:02:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-16 05:02:32 +0800 |
commit | c8ea41b049c887794e4dd87b690b3031b98458b9 (patch) | |
tree | 2e3fbfdeced634ff8079b19b9f9ecf769a714c76 /web_src/js/features/repo-search.ts | |
parent | 74b06d4f5cc8dd11140a778768d384c4240ecd66 (diff) | |
download | gitea-c8ea41b049c887794e4dd87b690b3031b98458b9.tar.gz gitea-c8ea41b049c887794e4dd87b690b3031b98458b9.zip |
Fix remaining typescript issues, enable `tsc` (#32840)
Fixes 79 typescript errors. Discovered at least two bugs in
`notifications.ts`, and I'm pretty sure this feature was at least
partially broken and may still be, I don't really know how to test it.
After this, only like ~10 typescript errors remain in the codebase but
those are harder to solve.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js/features/repo-search.ts')
-rw-r--r-- | web_src/js/features/repo-search.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web_src/js/features/repo-search.ts b/web_src/js/features/repo-search.ts index 9cc2dd4223..7f111dce33 100644 --- a/web_src/js/features/repo-search.ts +++ b/web_src/js/features/repo-search.ts @@ -5,9 +5,10 @@ export function initRepositorySearch() { repositorySearchForm.addEventListener('change', (e: Event & {target: HTMLFormElement}) => { e.preventDefault(); - const formData = new FormData(repositorySearchForm); - const params = new URLSearchParams(formData); - + const params = new URLSearchParams(); + for (const [key, value] of new FormData(repositorySearchForm).entries()) { + params.set(key, value.toString()); + } if (e.target.name === 'clear-filter') { params.delete('archived'); params.delete('fork'); |