Skip to content

Commit 5beea42

Browse files
oneyouziyucongshuang
andauthored
fix:默认语言对象格式错误导致浏览器预览报错 (#93)
Co-authored-by: yucongshuang <[email protected]>
1 parent 0fa60f0 commit 5beea42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/hap-server/src/preview/create-router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default async function createRouter(previewTarget) {
216216
const type = requestRoute in widgets ? 'card' : 'app'
217217
const script = routes[requestRoute]
218218
const currentLanguage = JSON.parse(
219-
process.env.VSCODE_NLS_CONFIG || `{locale: 'zh-CN'}`
219+
process.env.VSCODE_NLS_CONFIG || '{"locale":"zh-CN"}'
220220
).locale
221221
const html = await renderPage(TPL_PAGE_PATH, {
222222
title: manifest.name,

0 commit comments

Comments
 (0)