@social-mail/social-mail-web-server 1.4.716 → 1.4.718

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.716",
3
+ "version": "1.4.718",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -252,7 +252,11 @@ export default class SnapshotService {
252
252
  try {
253
253
  const file = await this.db.appFiles
254
254
  .where({ fileID }, (p) => (x) => x.appFileID === p.fileID)
255
- .firstOrFail();
255
+ .first();
256
+ if (!file) {
257
+ console.warn(`File not found for "${fileID}"`);
258
+ return;
259
+ }
256
260
  const [ ignore , ... fileIDs] = file.path.split("/").filter((x) => x) as any[];
257
261
  const files = await this.db.appFiles
258
262
  .where({ fileIDs }, (p) => (x) => x.appFileID in p.fileIDs)
@@ -290,7 +294,7 @@ export default class SnapshotService {
290
294
  return;
291
295
  }
292
296
 
293
- if (/^((https?\:\/\/)|(data\:\/\/)|(\/\/))/i.test(link)) {
297
+ if (/^((https?\:\/\/)|(data\:)|(\/\/))/i.test(link)) {
294
298
  return;
295
299
  }
296
300