mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-11-01 01:31:18 +01:00
stick to a single code style
This commit is contained in:
parent
e853a934ea
commit
b8037d869c
1 changed files with 9 additions and 9 deletions
|
|
@ -535,25 +535,25 @@ describe('TopNav', function () {
|
|||
lastModified,
|
||||
type: mime.lookup(file_path) || '',
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function addFileList(input, file_paths) {
|
||||
if (typeof file_paths === 'string')
|
||||
file_paths = [file_paths]
|
||||
else if (!Array.isArray(file_paths)) {
|
||||
throw new Error('file_paths needs to be a file path string or an Array of file path strings')
|
||||
if (typeof file_paths === 'string') {
|
||||
file_paths = [file_paths];
|
||||
} else if (!Array.isArray(file_paths)) {
|
||||
throw new Error('file_paths needs to be a file path string or an Array of file path strings');
|
||||
}
|
||||
|
||||
const file_list = file_paths.map(fp => createFile(fp))
|
||||
file_list.__proto__ = Object.create(FileList.prototype)
|
||||
const file_list = file_paths.map(fp => createFile(fp));
|
||||
file_list.__proto__ = Object.create(FileList.prototype);
|
||||
|
||||
Object.defineProperty(input, 'files', {
|
||||
value: file_list,
|
||||
writeable: false,
|
||||
})
|
||||
});
|
||||
|
||||
return input
|
||||
return input;
|
||||
}
|
||||
|
||||
it(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue