dexie-cloud-addon 4.0.0-beta.21 → 4.0.0-beta.22

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.
@@ -2011,10 +2011,17 @@
2011
2011
  return bytes;
2012
2012
  };
2013
2013
  const b64encode = typeof Buffer !== "undefined"
2014
- ? (b) => ArrayBuffer.isView(b)
2015
- ? Buffer.from(b.buffer, b.byteOffset, b.byteLength).toString("base64")
2016
- : Buffer.from(b).toString("base64")
2017
- : (b) => btoa(String.fromCharCode.apply(null, b));
2014
+ ? (b) => {
2015
+ if (ArrayBuffer.isView(b)) {
2016
+ return Buffer.from(b.buffer, b.byteOffset, b.byteLength).toString("base64");
2017
+ }
2018
+ else {
2019
+ return Buffer.from(b).toString("base64");
2020
+ }
2021
+ }
2022
+ : (b) => {
2023
+ return btoa(String.fromCharCode.apply(null, ArrayBuffer.isView(b) ? b : new Uint8Array(b)));
2024
+ };
2018
2025
 
2019
2026
  function interactWithUser(userInteraction, req) {
2020
2027
  let done = false;