Commit 5237f904 authored by Grandschtroumpf's avatar Grandschtroumpf

FileManager exposes "switchFile"

parent bdf6b8dd
......@@ -67,8 +67,8 @@
"yo-yoify": "^3.7.3"
},
"dependencies": {
"remix-plugin": "0.0.2-alpha.6",
"http-server": "^0.11.1",
"remix-plugin": "0.0.2-alpha.8",
"remixd": "0.1.8-alpha.6"
},
"repository": {
......
......@@ -22,7 +22,7 @@ const profile = {
// File System profile
// - events: ['currentFileChanged']
// - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile']
// - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile', 'switchFile']
class FileManager extends FileSystemApi {
constructor (localRegistry) {
......@@ -114,10 +114,7 @@ class FileManager extends FileSystemApi {
}
async getCurrentFile () {
const path = this.currentFile()
if (!path) throw new Error('no file selected')
console.log('Get current File', path)
return path
return this.currentFile()
}
getFile (path) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment