mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-25 03:09:00 -06:00
Guard JS http-batch-store accessing deleted chunk (#3134)
Workaround for https://github.com/attic-labs/noms/issues/3133.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@attic/noms",
|
||||
"license": "Apache-2.0",
|
||||
"version": "69.3.0",
|
||||
"version": "69.4.0",
|
||||
"description": "Noms JS SDK",
|
||||
"repository": "https://github.com/attic-labs/noms/tree/master/js/noms",
|
||||
"main": "dist/commonjs/noms.js",
|
||||
|
||||
@@ -121,8 +121,12 @@ export class Delegate {
|
||||
// Return success
|
||||
chunks.forEach(chunk => {
|
||||
const hashStr = chunk.hash.toString();
|
||||
reqs[hashStr](chunk);
|
||||
delete reqs[hashStr];
|
||||
const req = reqs[hashStr];
|
||||
// https://github.com/attic-labs/noms/issues/3133
|
||||
if (req) {
|
||||
req(chunk);
|
||||
delete reqs[hashStr];
|
||||
}
|
||||
});
|
||||
|
||||
// Report failure
|
||||
|
||||
Reference in New Issue
Block a user