summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-12-29 06:44:01 -0800
committerAaron Parecki <aaron@parecki.com>2016-12-29 06:44:01 -0800
commite7fe68f73e441778f80683383ddb2ffe7a48f85c (patch)
tree372e8fdb043225bd73818377bc8a3246eb94b741
parent07d0e958fdce4091b7b4fbc071fea42af2f5df12 (diff)
front-end check for author
-rw-r--r--views/new-post.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/views/new-post.php b/views/new-post.php
index 952f616..3418272 100644
--- a/views/new-post.php
+++ b/views/new-post.php
@@ -357,9 +357,11 @@ $(function(){
} else {
$(".reply-context .post-name").addClass('hidden');
}
- $(".reply-context .author .name").text(data.entry.author.name);
- $(".reply-context .author .url").text(data.entry.author.url);
- $(".reply-context img.author-img").attr('src', data.entry.author.photo);
+ if(data.entry.author) {
+ $(".reply-context .author .name").text(data.entry.author.name);
+ $(".reply-context .author .url").text(data.entry.author.url);
+ $(".reply-context img.author-img").attr('src', data.entry.author.photo);
+ }
if(data.entry.photo) {
$(".reply-context img.post-img").attr('src', data.entry.photo[0]).removeClass('hidden');
} else {