@vue-skuilder/db 0.1.36 → 0.1.38

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/index.mjs CHANGED
@@ -7767,7 +7767,7 @@ Currently logged-in as ${this._username}.`
7767
7767
  _rev: existingDoc._rev
7768
7768
  });
7769
7769
  } catch (e) {
7770
- if (e instanceof Error && e.name === "not_found") {
7770
+ if (e?.name === "not_found") {
7771
7771
  await this.remoteDB.put(doc);
7772
7772
  } else {
7773
7773
  throw e;
@@ -7794,7 +7794,7 @@ Currently logged-in as ${this._username}.`
7794
7794
  _rev: existingDoc._rev
7795
7795
  });
7796
7796
  } catch (e) {
7797
- if (e instanceof Error && e.name === "conflict" && retries > 0) {
7797
+ if (e?.name === "conflict" && retries > 0) {
7798
7798
  await new Promise((resolve) => setTimeout(resolve, 1e3));
7799
7799
  return this.applyDesignDoc(doc, retries - 1);
7800
7800
  }