@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/dist/server/services/files/SnapshotService.d.ts.map +1 -1
- package/dist/server/services/files/SnapshotService.js +7 -4
- package/dist/server/services/files/SnapshotService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/services/files/SnapshotService.ts +7 -4
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|
468
|
-
|
|
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()
|