diff --git a/lib/newFileMenu.ts b/lib/newFileMenu.ts index 0c7155e9..20b57179 100644 --- a/lib/newFileMenu.ts +++ b/lib/newFileMenu.ts @@ -72,12 +72,13 @@ export class NewFileMenu { /** * Get the list of registered entries * - * @param {Folder} context the creation context. Usually the current folder FileInfo + * @param {Folder} context the creation context. Usually the current folder + * @param {View} view the current view */ - public getEntries(context?: Folder): Array { - if (context) { + public getEntries(context?: Folder, view?: View): Array { + if (context && view) { return this._entries - .filter(entry => typeof entry.if === 'function' ? entry.if(context) : true) + .filter(entry => typeof entry.if === 'function' ? entry.if(context, view) : true) } return this._entries } diff --git a/tsconfig.json b/tsconfig.json index 3903dd49..807337f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,5 +9,6 @@ "strict": true, "noImplicitAny": false, "outDir": "./dist", + "rootDir": "./lib", } }