@d-i-t-a/reader 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -42925,14 +42925,14 @@ var SearchModule = class {
42925
42925
  this.currentSearchHighlights = [];
42926
42926
  this.bookSearchResult = [];
42927
42927
  reset();
42928
- this.searchAndPaintChapter(term, 0, async () => {
42928
+ await this.searchAndPaintChapter(term, 0, async () => {
42929
42929
  });
42930
- var chapter = this.searchChapter(term);
42931
- var book = this.searchBook(term);
42932
42930
  if (current) {
42933
- return chapter;
42931
+ await this.searchBook(term);
42932
+ return await this.searchChapter(term);
42934
42933
  } else {
42935
- return book;
42934
+ await this.searchChapter(term);
42935
+ return await this.searchBook(term);
42936
42936
  }
42937
42937
  }
42938
42938
  async goToSearchID(href, index2, current) {
@@ -43141,7 +43141,7 @@ var SearchModule = class {
43141
43141
  if (tocItem) {
43142
43142
  let href = this.publication.getAbsoluteHref(tocItem.Href);
43143
43143
  if (this.delegate.api?.getContent) {
43144
- this.delegate.api?.getContent(href).then((content) => {
43144
+ await this.delegate.api?.getContent(href).then((content) => {
43145
43145
  let parser = new DOMParser();
43146
43146
  let doc = parser.parseFromString(this.delegate.requestConfig?.encoded ? this.decodeBase64(content) : content, "application/xhtml+xml");
43147
43147
  if (tocItem) {
@@ -43193,7 +43193,7 @@ var SearchModule = class {
43193
43193
  if (tocItem) {
43194
43194
  let href = this.publication.getAbsoluteHref(tocItem.Href);
43195
43195
  if (this.delegate.api?.getContent) {
43196
- this.delegate.api?.getContent(href).then((content) => {
43196
+ await this.delegate.api?.getContent(href).then((content) => {
43197
43197
  let parser = new DOMParser();
43198
43198
  let doc = parser.parseFromString(this.delegate.requestConfig?.encoded ? this.decodeBase64(content) : content, "application/xhtml+xml");
43199
43199
  if (tocItem) {