bradcush / mark-tab-manager

Mark is a minimalist tab manager in the form of a browser extension that organizes tabs as you browse. With Mark, tabs are automatically grouped by domain and sorted alphabetically.
Apache License 2.0
16 stars 3 forks source link

fix(menus): remove potential menu items before creation #252

Closed bradcush closed 1 year ago

bradcush commented 1 year ago

Closes #227 and closes #161

bradcush commented 1 year ago

This fix explicitly removes all menu items using their menuItemId before creating new ones. All removal is wrapped in a try/catch but we still report the error to the console. There could be an issue with this approach if only some of the menu items need to be removed and not all of them. Let's observe behaviour with this fix and we can wrap each call to remove separately at a later time if needed.