Error handling response: TypeError: Cannot read property 'map' of undefined
at myOrigins (chrome-extension://cobicbhlbogbkdcmgdhejghphaiofodb/content/content.js:204:19)
at chrome-extension://cobicbhlbogbkdcmgdhejghphaiofodb/content/content.js:14:5
chrome.storage.sync.get(['subscribedForems','allforems'],function(result){constmyForems=result.subscribedForems;constallForems=result.allforems;if(!myForems){chrome.storage.sync.set({subscribedForems:[]});// Create empty array if not initialized.}if(!allForems){chrome.storage.sync.set({allforems:[]});// Create empty array if not initialized.}// myOrigins(null) will break map on line 203if(myOrigins(myForems).includes(currentOrigin)||validOrigins(allForems).includes(currentOrigin)||currentOrigin==='https://www.forem.com'){loadForemHTML(result.subscribedForems);document.addEventListener('add',handleAdd,false);document.addEventListener('remove',handleRemove,false);document.addEventListener('reorder',handleReorder,false);}
This would remove the error though I've not thought the logic through yet
chrome.storage.sync.get(['subscribedForems','allforems'],function(result){constmyForems=result.subscribedForems?result.subscribedForems:[];constallForems=result.allforems?result.allforems:[];if(!result.subscribedForems){chrome.storage.sync.set({subscribedForems:[]});// Create empty array if not initialized.}if(!result.allforems){chrome.storage.sync.set({allforems:[]});// Create empty array if not initialized.}if(myOrigins(myForems).includes(currentOrigin)||validOrigins(allForems).includes(currentOrigin)||currentOrigin==='https://www.forem.com'){loadForemHTML(result.subscribedForems);document.addEventListener('add',handleAdd,false);document.addEventListener('remove',handleRemove,false);document.addEventListener('reorder',handleReorder,false);}
For further actions, you may consider blocking this person and/or reporting abuse
Got it working.
I went to here
forem.com/valid_forems.json
Then suddenly it appeared on all my sites
EDIT: This was a red herring the bar appeared after the data was loaded, it just so happened I was on that page when it did.
So it took you visiting that endpoint manually before it worked? π€
That worked for me too in Chrome.
And is that all your sites like alll your sites or just Forems?
Sorry just forem sites
Yes I went there manually, when I started looking though the code and saw the bars existed in Dev and Forem suddenly.
Did someone ask for an error?
I think I see it
This would remove the error though I've not thought the logic through yet
Another fix.