@dittolive/ditto 4.8.0 → 4.8.1

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/README.md CHANGED
@@ -3,10 +3,10 @@
3
3
  _Ditto is a cross-platform SDK that allows mobile, web, and IoT apps to sync
4
4
  with and even without connectivity._
5
5
 
6
- Version: **4.8.0**
6
+ Version: **4.8.1**
7
7
 
8
8
  For more information please visit [ditto.live](https://ditto.live), as well as the
9
- [API Reference](https://software.ditto.live/js/Ditto/4.8.0/api-reference/) for this particular version.
9
+ [API Reference](https://software.ditto.live/js/Ditto/4.8.1/api-reference/) for this particular version.
10
10
 
11
11
  ---
12
12
 
package/node/ditto.cjs.js CHANGED
@@ -2233,7 +2233,7 @@ class AttachmentToken {
2233
2233
 
2234
2234
  // NOTE: this is patched up with the actual build version by Jake task
2235
2235
  // build:package and has to be a valid semantic version as defined here: https://semver.org.
2236
- const fullBuildVersionString = '4.8.0';
2236
+ const fullBuildVersionString = '4.8.1';
2237
2237
 
2238
2238
  //
2239
2239
  // Copyright © 2021 DittoLive Incorporated. All rights reserved.
@@ -9269,7 +9269,7 @@ class AttachmentFetcherManager {
9269
9269
  constructor(ditto) {
9270
9270
  // --- Private ---
9271
9271
  this.contextInfoByID = {};
9272
- this.finalizationRegistry = new FinalizationRegistry(this.stopWithContextInfo);
9272
+ this.finalizationRegistry = new FinalizationRegistry(this.stopWithContextInfo.bind(this));
9273
9273
  this.ditto = ditto;
9274
9274
  }
9275
9275
  /**
@@ -9291,9 +9291,8 @@ class AttachmentFetcherManager {
9291
9291
  this.contextInfoByID[attachmentFetcher.id] = contextInfo;
9292
9292
  // Prevent cancellation of the fetch once it was fulfilled or rejected.
9293
9293
  const resetCancelToken = () => {
9294
- if (this.contextInfoByID[attachmentFetcher.id] != null) {
9294
+ if (this.contextInfoByID[attachmentFetcher.id] != null)
9295
9295
  this.contextInfoByID[attachmentFetcher.id].cancelTokenPromise = null;
9296
- }
9297
9296
  };
9298
9297
  attachmentFetcher.attachment.then((value) => {
9299
9298
  resetCancelToken();
@@ -9335,9 +9334,8 @@ class AttachmentFetcherManager {
9335
9334
  const contextInfos = Object.values(this.contextInfoByID);
9336
9335
  const stopped = contextInfos.map(async (contextInfo) => {
9337
9336
  const attachmentFetcher = contextInfo.attachmentFetcher.deref();
9338
- if (attachmentFetcher != null) {
9337
+ if (attachmentFetcher != null)
9339
9338
  await this.stopAttachmentFetcher(attachmentFetcher);
9340
- }
9341
9339
  });
9342
9340
  await Promise.all(stopped);
9343
9341
  });
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dittolive/ditto",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
4
4
  "description": "Ditto is a cross-platform embeddable NoSQL database that can sync with or without an internet connection.",
5
5
  "homepage": "https://ditto.live",
6
6
  "license": "SEE LICENSE IN LICENSE.md",