Skip to content

Commit

Permalink
Adding another check in chrome of openTabdata presence
Browse files Browse the repository at this point in the history
  • Loading branch information
jrie committed Sep 29, 2018
1 parent 32ea6cf commit d1fdbc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function chromeGetStorageAndClearCookies (action, data, cookies, domainURL, curr

if (count === undefined) count = 0

if (openTabData[currentTab.windowId][currentTab.id][count]['d'] !== undefined) {
if (openTabData[currentTab.windowId][currentTab.id][count] !== undefined && openTabData[currentTab.windowId][currentTab.id][count]['d'] !== undefined) {
let targetURL = openTabData[currentTab.windowId][currentTab.id][count]['d'].replace(/(http|https):\/\//, '').replace('www.', '')
chrome.cookies.getAll({ 'domain': targetURL }, function (cookiesSub) {
++count
Expand Down

0 comments on commit d1fdbc4

Please sign in to comment.