fix getting file.filename for top-level files

This commit is contained in:
Conduitry 2018-05-01 16:20:10 -04:00
parent 8a3e1537aa
commit 92acb7c7fd
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ export default class File {
get filename() {
if (this[_filename] == null) {
const p = this[_path].lastIndexOf('/');
this[_filename] = p > -1 ? this[_path].slice(p + 1) : '';
this[_filename] = p > -1 ? this[_path].slice(p + 1) : this[_path];
}
return this[_filename];
}