Skip to content

Commit

Permalink
fix nested export key
Browse files Browse the repository at this point in the history
  • Loading branch information
tiejunhu committed Oct 8, 2021
1 parent 65b027c commit eb3cece
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
@@ -1,7 +1,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 @@ -13,12 +13,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 @@ -82,7 +82,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 eb3cece

Please sign in to comment.