Skip to content

Commit

Permalink
fixup! chore(binding-http): enable eslint/strict-boolean-expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Sep 22, 2023
1 parent 7e95682 commit cd074d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/binding-http/src/http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ export default class HttpServer implements ProtocolServer {
private addUrlRewriteEndpoints(form: TD.Form, forms: Array<TD.Form>): void {
if (this.urlRewrite != null) {
for (const [inUri, toUri] of Object.entries(this.urlRewrite)) {
if (form.href.endsWith(toUri)) {
console.log(toUri);
const foo = form.href.endsWith(toUri);
if (foo) {

Check failure on line 313 in packages/binding-http/src/http-server.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any value in conditional. An explicit comparison or type cast is required
const form2: TD.Form = JSON.parse(JSON.stringify(form)); // deep copy
form2.href = form2.href.substring(0, form.href.lastIndexOf(toUri)) + inUri;
forms.push(form2);
Expand Down

0 comments on commit cd074d8

Please sign in to comment.