fix(route): 罗磊的独立博客 (#16078)

This commit is contained in:
Ethan Shen 2024-07-04 00:30:42 +08:00 committed by GitHub
parent cf0d3467e6
commit 151dc2d337
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ export const handler = async (ctx) => {
const language = $('html').prop('lang');
const themeEl = $('link[rel="modulepreload"]')
.toArray()
.findLast((l) => /theme\.\w+\.js$/.test($(l).prop('href')));
.findLast((l) => /theme\..*\.js$/.test($(l).prop('href')));
const themeUrl = themeEl ? new URL($(themeEl).prop('href'), rootUrl).href : undefined;
const { data: themeResponse } = await got(themeUrl);