Explorar o código

Fixes the total byte counter reducer

craigsdennis %!s(int64=9) %!d(string=hai) anos
pai
achega
1ee80326a2
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      back-end/rom_comm.js

+ 3 - 1
back-end/rom_comm.js

@@ -311,7 +311,9 @@ class RomComm extends EventEmitter {
     }
 
     flashSpecifications(specs) {
-        let totalBytes = specs.reduce(() => specs.buffer.length, 0);
+        let totalBytes = specs.reduce((counter, spec) => {
+            counter += spec.buffer.length;
+        }, 0);
         let details = {
             totalFiles: specs.length,
             totalBytes: totalBytes,