File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( {
You can’t perform that action at this time.
0 commit comments