Skip to main content
2 of 4
added 13 characters in body
4b0
  • 406
  • 2
  • 9

I find the exact error which I faced:

cannot read property 0 or null

on this line when try to attach custom DOM elements.

 site_options += '<option ' + selected + ' value="' + value.site + '">Show Only ' + value.site[0].toUpperCase() + value.site.substr(1) + '</option>';

And fixed that to check null before this line:

if(value.site != null)
site_options += '<option ' + selected + ' value="' + value.site + '">Show Only ' + value.site[0].toUpperCase() + value.site.substr(1) + '</option>';

Now it's work.

4b0
  • 406
  • 2
  • 9