Blank screen on startup
Closed this issue · 2 comments
Issue
Extensions shows a blank screen on new tab page. Dev console contains this error:
19:11:12.883 TypeError: (destructured parameter) is undefined[Learn More] 4ea671bc80236735c193cd5c78acf6e3.js:1634:1
Cause
The error occurs here:
But truly it is caused here:
Map function doesn't filter out not returned values, it just returns an implicit undefined. Thus if retrieved bookmarks contains folders or place: urls, your bookmark array becomes filled with undefined values. The previous line tries to destructure an undefined value, and errors out.
Fix
My solution would be to filter the array to get rid of unwanted values and then map over it to transform.
BTW, at least in Firefox bookmarks can contain another type called 'separator', which you probably also do not want to display.
Great feedback. Yeah, I should filter first before map. I'll update this and upload fix soon.