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 Oct 12, 2023
1 parent 99c1082 commit 4624a03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/binding-http/src/http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,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)) {
if (form.href.endsWith(toUri)) {
const endsWithToUri: boolean = form.href.endsWith(toUri);
if (endsWithToUri) {
const form2 = structuredClone(form);
form2.href = form2.href.substring(0, form.href.lastIndexOf(toUri)) + inUri;
forms.push(form2);
Expand Down

0 comments on commit 4624a03

Please sign in to comment.