From 68739ddbdeca1dce870f958606712b62dbea7476 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Mon, 23 Oct 2017 02:19:25 +0300 Subject: [PATCH] [www] Document stability up --- src/core/Document.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/Document.js b/src/core/Document.js index b7c423d2..e4ef394c 100644 --- a/src/core/Document.js +++ b/src/core/Document.js @@ -22,7 +22,10 @@ class Document { this.id = data.id this.hash = data.hash this.file = data.file - this.fileInfo = new DocumentFile(data.fileInfo) + // In the future: use fileInfo only + this.fileInfo = data.fileInfo + ? new DocumentFile(data.fileInfo) + : new DocumentFile(data.file) this.type = data.type this.title = data.title this.category = data.category