From cafca4fcbde629cd91f2db186325ffe77dda35ab Mon Sep 17 00:00:00 2001 From: Grandschtroumpf Date: Fri, 17 May 2019 19:19:31 +0200 Subject: [PATCH] add the expection again --- src/app/files/fileManager.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/files/fileManager.js b/src/app/files/fileManager.js index 8d725319b4..7bc800515a 100644 --- a/src/app/files/fileManager.js +++ b/src/app/files/fileManager.js @@ -113,8 +113,10 @@ class FileManager extends FileSystemApi { return path ? path[1] : null } - async getCurrentFile () { - return this.currentFile() + getCurrentFile () { + const path = this.currentFile() + if (!path) throw new Error('No file selected') + return path } getFile (path) {