Merge branch 'master' of gitee.com:yoimiya-kokomi/Miao-Yunzai into master

Signed-off-by: 绫仓优希 <sakurajuzijiang@163.com>
This commit is contained in:
绫仓优希 2023-09-06 06:51:34 +00:00 committed by Gitee
commit 6d7587580f
1 changed files with 10 additions and 16 deletions

View File

@ -61,12 +61,8 @@ export default class PuppeteerRenderer {
* 初始化chromium
*/
async browserInit() {
if (this.browser) {
return this.browser
}
if (this.lock) {
return false
}
if (this.browser) return this.browser
if (this.lock) return false
this.lock = true
logger.info('puppeteer Chromium 启动中...')
@ -320,9 +316,7 @@ export default class PuppeteerRenderer {
/** 监听配置文件 */
watch(tplFile) {
if (this.watcher[tplFile]) {
return
}
if (this.watcher[tplFile]) return
const watcher = chokidar.watch(tplFile)
watcher.on('change', path => {