Skip to content

Commit

Permalink
fix: file is always null when a file is turned into a stream and then…
Browse files Browse the repository at this point in the history
… sent to a server
  • Loading branch information
Niels Stümper authored and kylefarris committed Mar 18, 2024
1 parent f88a57b commit 2158c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ class NodeClam {
// Attempt to scan the stream.
try {
const isInfected = await this.scanStream(stream);
return hasCb ? cb(null, file, isInfected, []) : resolve({ file, ...isInfected });
return hasCb ? cb(null, file, isInfected, []) : resolve({ ...isInfected, file });
} catch (e) {
// Fallback to local if that's an option
if (this.settings.clamdscan.localFallback === true) return await localScan();
Expand Down

0 comments on commit 2158c40

Please sign in to comment.