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 236e1ca commit 1c09be6
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 @@ -307,9 +307,8 @@ export default class HttpServer implements ProtocolServer {

private addUrlRewriteEndpoints(form: TD.Form, forms: Array<TD.Form>): void {
if (this.urlRewrite) {
for (const inUri in this.urlRewrite) {
const toUri = this.urlRewrite[inUri];
if (form.href.endsWith(toUri)) {
for (const [inUri, toUri] of Object.entries(this.urlRewrite)) {
if (toUri != null && form.href.endsWith(toUri)) {
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 1c09be6

Please sign in to comment.