File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -51,24 +51,25 @@ var Storage = (() => {
5151 if ( ! k . endsWith ( "/0" ) ) continue ;
5252 const [ keyName ] = k . split ( "/" ) ;
5353 if ( allSyncData [ keyName ] !== "[CHUNKED]" ) {
54- // not flagged as chunked, bail out and doome the remnants
54+ // not flagged as chunked, bail out and doom the remnants
5555 continue ;
5656 }
5757 const ccKey = chunksKey ( keyName ) ;
58- let count = parseInt ( allSyncData [ ccKey ] ) ;
59- let contiguousKeys = [ ] ;
58+ const count = parseInt ( allSyncData [ ccKey ] ) ;
59+ const contiguousKeys = [ ] ;
6060 const keyPrefix = keyName . concat ( '/' ) ;
6161 for ( let j = 1 ; ; j ++ ) {
6262 contiguousKeys . push ( k ) ;
6363 if ( j >= count ) break ;
6464 k = keyPrefix . concat ( j ) ;
6565 if ( ! keys . includes ( k ) ) break ;
6666 }
67- let actualCount = contiguousKeys . length ;
68- if ( count === actualCount ) continue ;
69- // try to repair
70- repaired [ ccKey ] = actualCount ;
7167 safeKeys . push ( ccKey , ...contiguousKeys ) ;
68+ const actualCount = contiguousKeys . length ;
69+ if ( count !== actualCount ) {
70+ // try to repair
71+ repaired [ ccKey ] = actualCount ;
72+ }
7273 }
7374
7475 const doomedKeys = keys . filter ( k => chunkedRx . test ( k ) && ! safeKeys . includes ( k ) ) ;
You can’t perform that action at this time.
0 commit comments