Skip to content

Commit 589fea5

Browse files
committed
fix: use options.
1 parent 5a04f6a commit 589fea5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/methods/create.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ export interface CreateOptions {
2121
fetchContent?: boolean;
2222
}
2323

24-
export const create = async ({ files, ...options }: CreateOptions) => {
25-
if (!Array.isArray(files) || !files.length)
24+
export const create = async (options: CreateOptions) => {
25+
if (!Array.isArray(options.files) || !options.files.length)
2626
throw new TypeError('Expected an array of one or more files');
2727

28-
if (files.length > 1) {
28+
if (options.files.length > 1) {
2929
throw new Error(
3030
'You must have Sourcebin pro in order to have multiple files in one bin. This is currently not supported with this library',
3131
);
@@ -37,7 +37,7 @@ export const create = async ({ files, ...options }: CreateOptions) => {
3737
files: [],
3838
};
3939

40-
for (const file of files) {
40+
for (const file of options.files) {
4141
const languageId = resolveLanguageId(file.language || 'text');
4242

4343
data.files.push({

0 commit comments

Comments
 (0)