Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(menubar): Code style fixes #4945

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading