Skip to content

Commit

Permalink
Merge pull request #275 from tiejunhu/master
Browse files Browse the repository at this point in the history
fix nested export key
  • Loading branch information
ts-thomas authored Oct 3, 2022
2 parents 9c83423 + eb3cece commit d10ddca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { IndexInterface, DocumentInterface } from "./type.js";
import { create_object, is_string } from "./common.js";

function async(callback, self, key, index_doc, index, data){
function async(callback, self, key, field, index_doc, index, data){

setTimeout(function(){

Expand All @@ -15,12 +15,12 @@ function async(callback, self, key, index_doc, index, data){

res["then"](function(){

self.export(callback, self, key, index_doc, index + 1);
self.export(callback, self, field, index_doc, index + 1);
})
}
else{

self.export(callback, self, key, index_doc, index + 1);
self.export(callback, self, field, index_doc, index + 1);
}
});
}
Expand Down Expand Up @@ -84,7 +84,7 @@ export function exportIndex(callback, self, field, index_doc, index){
return;
}

async(callback, self || this, field ? field + "." + key : key, index_doc, index, data);
async(callback, self || this, field ? field + "." + key : key, field, index_doc, index, data);

return true;
}
Expand Down

0 comments on commit d10ddca

Please sign in to comment.