فهرست منبع

Fixes the total byte counter reducer

craigsdennis 9 سال پیش
والد
کامیت
1ee80326a2
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  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,