Browse Source

error if file from localStorage is old (no manifest)

Danny Coates 6 years ago
parent
commit
0c458e180c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/ownedFile.js

+ 3 - 0
app/ownedFile.js

@@ -4,6 +4,9 @@ import { del, fileInfo, setParams, setPassword } from './api';
 
 export default class OwnedFile {
   constructor(obj) {
+    if (!obj.manifest) {
+      throw new Error('invalid file object');
+    }
     this.id = obj.id;
     this.url = obj.url;
     this.name = obj.name;