diff --git a/src/public/javascripts/widgets/basic_widget.js b/src/public/javascripts/widgets/basic_widget.js index c8812ef1b..4b5a7dc34 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 a945aacb0..8801c93ff 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();