Skip to content

Commit

Permalink
sync with main repo
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 8, 2024
1 parent 9988bff commit 08a9154
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -988,13 +988,11 @@
const absPath = new URL(href, dummyBase).href.slice(
location.origin.length
);

const containingPath = (path) =>
path.slice(0, path.lastIndexOf('/')) || '/';
const parent = absPath.slice(0, absPath.lastIndexOf('/')) || '/';

return (
window.fileCache
.get(containingPath(absPath))
.get(parent)
?.files.find(({ name }) => name === absPath.split('/').pop())
?.url ||
window.GLOBAL_CONFIG.SCF_GATEWAY.replace(/\/$/, '') + absPath
Expand Down

0 comments on commit 08a9154

Please sign in to comment.