Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/js-client/src/sbFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SbFetch {
): Promise<ISbResponse | ISbError> {
let urlString = `${this.baseURL}${this.url}`;

let body = null;
let body: string | null = null;

if (method === 'get') {
urlString = `${this.baseURL}${this.url}?${stringify(this.parameters)}`;
Expand All @@ -119,7 +119,7 @@ class SbFetch {
const controller = new AbortController();
const { signal } = controller;

let timeout;
let timeout: ReturnType<typeof setTimeout> | null = null;

if (this.timeout) {
timeout = setTimeout(() => controller.abort(), this.timeout);
Expand All @@ -134,7 +134,7 @@ class SbFetch {
...this.fetchOptions,
});

if (this.timeout) {
if (this.timeout && timeout) {
clearTimeout(timeout);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/js-client/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const stringify = (
prefix?: string,
isArray?: boolean,
): string => {
const pairs = [];
const pairs: string[] = [];
for (const key in params) {
if (!Object.prototype.hasOwnProperty.call(params, key)) {
continue;
Expand Down
Loading