Skip to content

Commit

Permalink
chore: Optimize hmr boundaries and return values
Browse files Browse the repository at this point in the history
  • Loading branch information
ErKeLost committed Dec 25, 2023
1 parent 733db6d commit a0e73c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"rsplit",
"Rustup",
"sabi",
"safelisted",
"sirv",
"styl",
"stylesheet",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/server/hmr-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class HmrEngine {
await this.recompileAndSendResult();
} catch (e) {
// eslint-disable-next-line no-control-regex
const serialization = e.message.replace(/\x1b\[[0-9;]*m/g, "")
const serialization = e.message.replace(/\x1b\[[0-9;]*m/g, "");
const errorStr = `${JSON.stringify({
message: serialization
})}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-plugin-hmr/src/hmr-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function clearOverlay() {
}

function hasErrorOverlay() {
return document.querySelectorAll(overlayId).length
return document.querySelectorAll(overlayId).length;
}

export function waitForWindowShow() {
Expand Down

0 comments on commit a0e73c9

Please sign in to comment.