浏览代码

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,