Skip to content

Commit d395e70

Browse files
committed
chore: compat with ts 4.4
1 parent 6cbf3e0 commit d395e70

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

packages/@vuepress/core/src/page/resolvePageFileContent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const resolvePageFileContent = async ({
1919
const content = await fs.readFile(filePath, 'utf-8')
2020
return content
2121
} catch (e) {
22-
log(e.message)
22+
log(e instanceof Error ? e.message : e)
2323
}
2424
}
2525

packages/@vuepress/core/src/pluginApi/createHookQueue.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ export const createHookQueue = <T extends HooksName>(name: T): HookQueue<T> => {
3636
if (result !== undefined) {
3737
results.push(result)
3838
}
39-
} catch (error) {
39+
} catch (e) {
4040
logger.error(
4141
`error in hook ${chalk.magenta(name)} from ${chalk.magenta(
4242
item.pluginName
4343
)}`
4444
)
45-
throw error
45+
throw e
4646
}
4747
}
4848

packages/@vuepress/plugin-pwa-popup/src/client/components/PwaPopup.ts

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const PwaPopup = defineComponent({
4141
show.value = false
4242
if (registration.value) {
4343
useSkipWaiting(registration.value)
44+
// @ts-expect-error: Firefox supports a non-standard forceGet boolean parameter for location.reload()
4445
location.reload(true)
4546
}
4647
}

0 commit comments

Comments
 (0)