check if json.error_data exists

This commit is contained in:
teddit 2021-08-03 08:12:37 +02:00
parent 795aa70aa1
commit 33489ea234

View File

@ -19,7 +19,8 @@ html
if error if error
if json.error_data.reason === "private" if json.error_data.reason === "private"
h2 This is a private subreddit. h2 This is a private subreddit.
p Error: #{JSON.stringify(json.error_data)} if json.error_data
p Error: #{JSON.stringify(json.error_data)}
else else
if show_nsfw_warning === true if show_nsfw_warning === true
.nsfw-warning .nsfw-warning