Fix JS error when viewing private blog posts