diff --git a/src/component/groupArea/index.js b/src/component/groupArea/index.js index 1c43598a..b8c53853 100644 --- a/src/component/groupArea/index.js +++ b/src/component/groupArea/index.js @@ -182,21 +182,25 @@ export const GroupArea = function({ }), open: () => { - if (state.get.current().bookmark.newTab) { + if ('tabs' in chrome) { - groupData.group.items.forEach((item, i) => { - chrome.tabs.create({ url: item.url }); - }); + if (state.get.current().bookmark.newTab) { - } else { + groupData.group.items.forEach((item, i) => { + chrome.tabs.create({ url: item.url }); + }); - const first = groupData.group.items.shift(); + } else { - groupData.group.items.forEach((item, i) => { - chrome.tabs.create({ url: item.url }); - }); + const first = groupData.group.items.shift(); - window.location.href = first.url; + groupData.group.items.forEach((item, i) => { + chrome.tabs.create({ url: item.url }); + }); + + window.location.href = first.url; + + }; };