Skip to content

Commit 46d2244

Browse files
committed
fix: handle missing locale version in update check
1 parent 63cba57 commit 46d2244

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/core/src/injectScript.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ function __checkUpdateSetup__(options: Options) {
9595
} = options
9696
const checkSystemUpdate = () => {
9797
const localeVersion = getLocaleVersion()
98+
if (!localeVersion) {
99+
console.error('[pluginWebUpdateNotice] Failed to get locale version')
100+
return
101+
}
102+
98103
window
99104
.fetch(`${injectFileBase}${DIRECTORY_NAME}/${JSON_FILE_NAME}.json?t=${Date.now()}`)
100105
.then((response) => {

0 commit comments

Comments
 (0)