Skip to content

Commit

Permalink
Fix typing errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
sangaline committed Jan 14, 2024
1 parent 1129dfb commit 8ba848a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/lib/api/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
AxiosResponse,
AxiosInstance,
} from "axios";
import { FormData } from "formdata-node";
import { FormData } from "lib/isomorphic"; // DO NOT REMOVE OR CHANGE THIS, MANUAL EDIT!!!

import { ApiError } from "./ApiError";
import type { ApiRequestOptions } from "./ApiRequestOptions";
Expand Down Expand Up @@ -172,7 +172,10 @@ export const getHeaders = async (
const password = await resolve(options, config.PASSWORD);
const additionalHeaders = await resolve(options, config.HEADERS);
const formHeaders =
(typeof formData?.getHeaders === "function" && formData?.getHeaders()) ||
(formData &&
"getHeaders" in formData &&
typeof formData?.getHeaders === "function" &&
formData?.getHeaders()) ||
{};

const headers = Object.entries({
Expand Down
2 changes: 1 addition & 1 deletion src/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class Client {
}

async createCircuit(
project: string | File[],
project: string | Array<BrowserFile | NodeFile>,
tags: string | string[] | null = ["latest"],
): Promise<CircuitInfoResponse> {
const formData = new FormData();
Expand Down

0 comments on commit 8ba848a

Please sign in to comment.