display last noteId in the note path widget as well

This commit is contained in:
zadam 2020-04-08 10:19:15 +02:00
parent 9c04ef9fb7
commit 1175a8ee49
2 changed files with 4 additions and 3 deletions

View File

@ -56,7 +56,9 @@ class BasicWidget extends Component {
for (const key in this.attrs) {
if (key === 'style') {
$widget.attr(key, $widget.attr('style') + ';' + this.attrs[key]);
if (this.attrs[key]) {
$widget.attr(key, $widget.attr('style') + ';' + this.attrs[key]);
}
}
else {
$widget.attr(key, this.attrs[key]);

View File

@ -61,8 +61,7 @@ export default class NotePathsWidget extends TabAwareWidget {
}
async refreshWithNote(note, notePath) {
let noteIdsPath = treeService.parseNotePath(notePath);
noteIdsPath = noteIdsPath.slice(0, noteIdsPath.length - 1);
const noteIdsPath = treeService.parseNotePath(notePath);
this.$currentPath.empty();