Skip to content

Commit a898017

Browse files
author
samuelhakala
committed
changed toolbar items to grouped items
1 parent 5ceec90 commit a898017

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/toolbar.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ID from './UUID';
88
import store from './stores/store';
99

1010
function buildItemGroups(itemGroups, defaultItems) {
11-
if(itemGroups.length > 0) {
11+
if(itemGroups && itemGroups.length > 0) {
1212
return itemGroups.map((group) => {
1313
let modifiedGroup = JSON.parse(JSON.stringify(group))
1414
let modifiedItems = [...group.items]
@@ -17,7 +17,7 @@ function buildItemGroups(itemGroups, defaultItems) {
1717
console.log(modifiedGroup)
1818
return modifiedGroup
1919
})
20-
}
20+
} else return []
2121
}
2222
function isDefaultItem(item) {
2323
const keys = Object.keys(item);

0 commit comments

Comments
 (0)