- for (const id in subtrees) {
- if (subtrees.hasOwnProperty(id)) {
- this.$el
- .find(`#toolbar-link-${id}`)
- .once('toolbar-subtrees')
- .after(subtrees[id]);
- }
- }
+ Object.keys(subtrees || {}).forEach((id) => {
+ this.$el
+ .find(`#toolbar-link-${id}`)
+ .once('toolbar-subtrees')
+ .after(subtrees[id]);
+ });