Skip to content

Commit

Permalink
Revert "fix: revert guard removal made in 9cb2744 (#54)"
Browse files Browse the repository at this point in the history
This reverts commit a6a4c08.
  • Loading branch information
ndhoule committed Oct 21, 2024
1 parent a6a4c08 commit 56f1d1e
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,14 @@ extension.addBuildEventHandler(
}

if (!tempConfig) {
// FIXME(ndhoule): This is a bug. At one point we added a default value for config, which
// means we can no longer enter this case.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!config) {
config = {
reportOnly: true,
reportUri: "",
unsafeEval: true,
path: ["/*"],
excludedPath: [],
};
console.log("Using default CSP config.");
} else {
console.log("Using stored CSP config.");
}
config = {
reportOnly: true,
reportUri: "",
unsafeEval: true,
path: ["/*"],
excludedPath: [],
};
console.log("Using default CSP config.");
}

// Ensure if path is not present, that it is set to "/*" as a default
Expand Down

0 comments on commit 56f1d1e

Please sign in to comment.