Skip to content

Commit 601da03

Browse files
committed
Fixing bug with latest devel (type is sent as "undefined" instead of "")
1 parent 0f77884 commit 601da03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/collections.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,7 @@ export interface DocumentCollection<
14661466
import(
14671467
data: Buffer | Blob | string,
14681468
options?: documents.ImportDocumentsOptions & {
1469-
type?: "documents" | "list" | "auto";
1469+
type?: "" | "documents" | "list" | "auto";
14701470
}
14711471
): Promise<documents.ImportDocumentsResult>;
14721472
//#endregion
@@ -2296,7 +2296,7 @@ export interface EdgeCollection<
22962296
import(
22972297
data: Buffer | Blob | string,
22982298
options?: documents.ImportDocumentsOptions & {
2299-
type?: "documents" | "list" | "auto";
2299+
type?: "" | "documents" | "list" | "auto";
23002300
}
23012301
): Promise<documents.ImportDocumentsResult>;
23022302
//#endregion
@@ -2875,12 +2875,12 @@ export class Collection<
28752875
import(
28762876
data: Buffer | Blob | string | any[],
28772877
options: documents.ImportDocumentsOptions & {
2878-
type?: "documents" | "list" | "auto";
2878+
type?: "" | "documents" | "list" | "auto";
28792879
} = {}
28802880
): Promise<documents.ImportDocumentsResult> {
28812881
const search = { ...options, collection: this._name };
28822882
if (Array.isArray(data)) {
2883-
search.type = Array.isArray(data[0]) ? undefined : "documents";
2883+
search.type = Array.isArray(data[0]) ? "" : "documents";
28842884
const lines = data as any[];
28852885
data = lines.map((line) => JSON.stringify(line)).join("\r\n") + "\r\n";
28862886
}

0 commit comments

Comments
 (0)