Skip to content

Build your personal knowledge base with Trilium Notes

display last noteId in the note path widget as well

zadam1175a8ee496f
diff --git a/src/public/javascripts/widgets/basic_widget.js b/src/public/javascripts/widgets/basic_widget.js
index c8812ef1ba..4b5a7dc346 100644
--- a/src/public/javascripts/widgets/basic_widget.js
+++ b/src/public/javascripts/widgets/basic_widget.js
@@ -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]);
diff --git a/src/public/javascripts/widgets/note_paths.js b/src/public/javascripts/widgets/note_paths.js
index a945aacb0a..8801c93ff6 100644
--- a/src/public/javascripts/widgets/note_paths.js
+++ b/src/public/javascripts/widgets/note_paths.js
@@ -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();