mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-02 13:44:16 +09:00
Backport https://github.com/go-gitea/gitea/pull/39432 - A `#L0` URL hash made `selectRange` index the line list at -1 and throw inside `initRepoCodeView`, which aborted every init function after it on the page. Line numbers below 1 now select nothing. - The JS error filter only accepted stacks under the asset prefix, but the vite dev server serves the sources from `/web_src/`, so dev mode dropped every error without showing a banner. Outside production, the filter now also accepts stacks from `/web_src/`.
This commit is contained in:
1 parent
2b11ba861f
commit
40079c7c09
4 files changed
+18
No files matched your search
@@ -58,6 +58,7 @@ function selectRange(range: string): Element | null {
|
||||
stopLineNum = tmp;
|
||||
range = `${stop}-${start}`;
|
||||
}
|
||||
if (startLineNum < 1) return null;
|
||||
|
||||
const first = elLineNums[startLineNum - 1] ?? null;
|
||||
for (let i = startLineNum - 1; i <= stopLineNum - 1 && i < elLineNums.length; i++) {
|
||||
|
||||
Reference in new issue
Block a user