Skip to content

Commit 713eda3

Browse files
committed
fix: add more nuance to logging about overlay option state
1 parent e72e6fd commit 713eda3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

client-src/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ if (parsedResourceQuery.progress === "true") {
6767
if (parsedResourceQuery.overlay) {
6868
try {
6969
options.overlay = JSON.parse(parsedResourceQuery.overlay);
70-
log.info("Error overlay enabled.");
7170
} catch (e) {
7271
log.error("Error parsing overlay options from resource query:", e);
7372
}
@@ -80,6 +79,17 @@ if (parsedResourceQuery.overlay) {
8079
...options.overlay,
8180
};
8281
}
82+
83+
if (
84+
options.overlay === true ||
85+
(options.overlay.errors && options.overlay.warnings)
86+
) {
87+
log.info("Overlay is enabled for errors and warnings.");
88+
} else if (options.errors) {
89+
log.info("Overlay is enabled for errors.");
90+
} else if (options.warnings) {
91+
log.info("Overlay is enabled for warnings.");
92+
}
8393
}
8494

8595
if (parsedResourceQuery.logging) {

0 commit comments

Comments
 (0)