Apply suggestions from code review

Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Max Schmitt 2024-06-12 22:15:33 +02:00 committed by GitHub
parent baaac82d86
commit 2d2bf4ee88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,9 +37,9 @@ export async function prepareFilesForUpload(frame: Frame, params: channels.Eleme
throw new Error('Exactly one of payloads, localPaths and streams must be provided');
if (streams)
localPaths = streams.map(c => (c as WritableStreamDispatcher)).map(s => s.path());
localPaths = streams.map(c => (c as WritableStreamDispatcher).path());
if (directoryStream)
localDirectory = (directoryStream as WritableStreamDispatcher | undefined)?.path();
localDirectory = (directoryStream as WritableStreamDispatcher).path();
if (localPaths) {
for (const p of localPaths)