Skip to content

Commit

Permalink
fix: Prevent app crashes from parse errors due to incomplete file sav…
Browse files Browse the repository at this point in the history
…es (#1114)
  • Loading branch information
breadgrocery authored Oct 28, 2024
1 parent 0e4d3ad commit c17ce34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/i18n/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ export { type GeneratedI18nStructure }
if (wxt.config.command === 'serve') {
wxt.hooks.hookOnce('build:done', () => {
const watcher = watch(localesDir);
watcher.on('change', updateLocalizations);
watcher.on('change', (path) => {
updateLocalizations(path).catch(wxt.logger.error);
});
});
}
},
Expand Down

0 comments on commit c17ce34

Please # to comment.