Skip to content

Commit

Permalink
Merge pull request #2941 from ethereum/fix_provider_get
Browse files Browse the repository at this point in the history
Return "null" if file not found
  • Loading branch information
yann300 authored Jul 9, 2020
2 parents bf405cd + 8f20b7e commit 3abde6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/files/remixDProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])
})
}

Expand Down

0 comments on commit 3abde6d

Please sign in to comment.