Skip to content

Commit

Permalink
fix(menubar): Code style fixes
Browse files Browse the repository at this point in the history
Fixes: #4944

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Nov 7, 2023
1 parent a6e212f commit 14c1f86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Menu/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
@keydown.right.stop="handleToolbarNavigation">
<!-- The visible inline actions -->
<component :is="actionEntry.component ? actionEntry.component : (actionEntry.children ? 'ActionList' : 'ActionSingle')"
v-for="actionEntry, index of visibleEntries"
v-for="(actionEntry, index) in visibleEntries"
ref="menuEntries"
:key="actionEntry.key"
:action-entry="actionEntry"
Expand Down Expand Up @@ -155,7 +155,7 @@ export default {
computed: {
visibleEntries() {
const list = this.entries.filter(({ priority }) => {
// if entry do not have priority, we assume it aways will be visible
// if entry has no priority, we assume it always will be visible
return priority === undefined || priority <= this.iconsLimit
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/ReadonlyBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class="text-readonly-bar__entries"
:aria-label="t('text', 'Editor actions')">
<component :is="actionEntry.component ? actionEntry.component : (actionEntry.children ? 'ActionList' : 'ActionSingle')"
v-for="actionEntry, index of visibleEntries"
v-for="(actionEntry, index) in visibleEntries"
ref="menuEntries"
:key="actionEntry.key"
:action-entry="actionEntry"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/ToolBarLogic.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineComponent({
watch: {
visibleEntries() {
this.$nextTick(() => {
if (this.activeMenuEntry > this.visibleEntries.length || this.visibleEntries[this.activeMenuEntry].disabled) {
if (this.activeMenuEntry > this.visibleEntries.length || this.visibleEntries[this.activeMenuEntry]?.disabled) {
this.setNextMenuEntry()
}
})
Expand Down

0 comments on commit 14c1f86

Please sign in to comment.