From 0c458e180c4f047309db06b75b784769159adfdc Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 12 Mar 2019 07:39:50 -0700 Subject: [PATCH] error if file from localStorage is old (no manifest) --- app/ownedFile.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/ownedFile.js b/app/ownedFile.js index d6d91a53..04b497d1 100644 --- a/app/ownedFile.js +++ b/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;