Skip to content

Commit

Permalink
Code optimization [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Nov 19, 2023
1 parent f143d1b commit bd7e103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Client {
constructor(apiKey, blog, options = {}) {
const baseUrl = options.baseUrl ?? "https://rest.akismet.com";
this.apiKey = apiKey;
this.baseUrl = new URL(baseUrl.slice(-1) == "/" ? baseUrl : `${baseUrl}/`);
this.baseUrl = new URL(baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`);
this.blog = blog;
this.isTest = options.isTest ?? false;
this.userAgent = options.userAgent ?? `Node.js/${version.slice(1)} | Akismet/${Client.#version}`;
Expand Down

0 comments on commit bd7e103

Please sign in to comment.