diff options
| author | Alex Yatskov <alex@foosoft.net> | 2017-06-25 15:56:30 -0700 | 
|---|---|---|
| committer | Alex Yatskov <alex@foosoft.net> | 2017-06-25 15:56:30 -0700 | 
| commit | 1849f95b4ecf618a250d37268ad6d2a7f3ea8888 (patch) | |
| tree | bf3bc0e034380286f9570fb53882dc2199d0ab95 | |
| parent | 4cb7e8d2ac9bca9912dc728a0bd43f643bff6dda (diff) | |
simplify file loading
| -rw-r--r-- | ext/bg/js/util.js | 9 | 
1 files changed, 1 insertions, 8 deletions
| diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index ea307b6b..cdd5ec31 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -456,14 +456,7 @@ function jsonLoadInt(url) {   */  function zipLoadDb(archive, indexLoaded, termsLoaded, kanjiLoaded) { -    return JSZip.loadAsync(archive).then(files => { -        const fileMap = {}; -        files.forEach((path, file) => { -            fileMap[path] = file; -        }); - -        return fileMap; -    }).then(files => { +    return JSZip.loadAsync(archive).then(files => files.files).then(files => {          const indexFile = files['index.json'];          if (!indexFile) {              return Promise.reject('no dictionary index found in archive'); |