Skip to content

Commit

Permalink
chore(popup-menu): simplify entries generation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Jan 16, 2023
1 parent c13c0f8 commit 9883736
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/features/popup-menu/PopupMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,13 @@ PopupMenu.prototype._render = function() {
options
} = this._current;

const entriesArray = [
...Object.entries(entries).map(
([ key, value ]) => ({ id: key, ...value })
)
];
const entriesArray = Object.entries(entries).map(
([ key, value ]) => ({ id: key, ...value })
);

const headerEntriesArray = [
...Object.entries(headerEntries).map(
([ key, value ]) => ({ id: key, ...value })
)
];
const headerEntriesArray = Object.entries(headerEntries).map(
([ key, value ]) => ({ id: key, ...value })
);

const position = _position && (
(container) => this._ensureVisible(container, _position)
Expand Down

0 comments on commit 9883736

Please sign in to comment.