@social-mail/social-mail-web-server 1.4.730 → 1.4.732

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.4.730",
3
+ "version": "1.4.732",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -392,7 +392,11 @@ export default class SnapshotService {
392
392
  const tokens = url.pathname.substring(1).split("/");
393
393
  const fileContentID = tokens[5];
394
394
  const fileContent = await this.downloadSnapshotContent(fileContentID, link);
395
- e.parentElement.replaceChildren(...fileContent);
395
+ const parent = e.parentElement;
396
+ for (const iterator of fileContent) {
397
+ parent.insertBefore(iterator, e);
398
+ }
399
+ e.remove();
396
400
  updated = true;
397
401
  }
398
402
 
@@ -464,9 +468,8 @@ export default class SnapshotService {
464
468
  const localFile = await this.tempFileService.downloadAppFile(file);
465
469
  const text = await localFile.readAsText();
466
470
  await localFile.delete();
467
- const parser = new DOMParser();
468
- const doc = parser.parseFromString(text, "text/html");
469
- return Array.from(doc.body.children) as HTMLElement[];
471
+ const dom = new JSDOM(text);
472
+ return Array.from(dom.window.document.body.children) as HTMLElement[];
470
473
  }
471
474
 
472
475
  @cacheFor()