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 cd074d8 commit 88e7ac8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/binding-http/src/http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,8 @@ 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)) {
console.log(toUri);
const foo = form.href.endsWith(toUri);
if (foo) {
// TODO: Without === true, this is currently an eslint false positiv
if (form.href.endsWith(toUri) === true) {
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 88e7ac8

Please sign in to comment.