error if file from localStorage is old (no manifest)

This commit is contained in:
Danny Coates 2019-03-12 07:39:50 -07:00
parent c908f0a927
commit 0c458e180c
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB

View File

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