Create new variable in document and index exports, which contains a handle for Promise resolve call. When Index is exported directly, then field argument is undefined, thus the Promise is resolved inside the index export method. When Document is exported, then field argument is set, thus preventing Promise to be resolved inside Index export method before all indexes, store, and tags are exported.
There are no breaking changes, although method signature must be updated in documentation, since a Promise is now returned.
Create new variable in document and index exports, which contains a handle for Promise resolve call. When Index is exported directly, then
field
argument isundefined
, thus the Promise is resolved inside the index export method. When Document is exported, thenfield
argument is set, thus preventing Promise to be resolved inside Index export method before all indexes, store, and tags are exported.There are no breaking changes, although method signature must be updated in documentation, since a Promise is now returned.
Fixes #353