From b8037d869cd2efc5576f1d61ac2e12689732e70a Mon Sep 17 00:00:00 2001 From: El RIDO Date: Mon, 6 Oct 2025 15:50:26 +0200 Subject: [PATCH] stick to a single code style --- js/test/TopNav.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/test/TopNav.js b/js/test/TopNav.js index 93f215b5..84b30643 100644 --- a/js/test/TopNav.js +++ b/js/test/TopNav.js @@ -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(