From 625d3fb41aadd325843781618664eb248ecae9c5 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 9 Jul 2020 12:20:35 +0200 Subject: [PATCH] always return null for the file if not found --- apps/remix-ide/src/app/files/remixDProvider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/files/remixDProvider.js b/apps/remix-ide/src/app/files/remixDProvider.js index 6c43072257..30fe62bf14 100644 --- a/apps/remix-ide/src/app/files/remixDProvider.js +++ b/apps/remix-ide/src/app/files/remixDProvider.js @@ -96,10 +96,10 @@ module.exports = class RemixDProvider { if (file.readonly) { this._readOnlyFiles[path] = 1 } cb(null, file.content) }).catch((error) => { + if (error) console.log(error) // display the last known content. // TODO should perhaps better warn the user that the file is not synced. - if (this.filesContent[path]) return cb(null, this.filesContent[path]) - else cb(error) + return cb(null, this.filesContent[path]) }) }