diff --git a/plugin.rb b/plugin.rb index 342b5b9..62749d7 100644 --- a/plugin.rb +++ b/plugin.rb @@ -49,8 +49,8 @@ after_initialize do def excerpt Post.excerpt(object.cooked, 70) end - def username; object.user.username; end - def avatar_template; object.user.avatar_template; end + def username; object.user && object.user.username; end + def avatar_template; object.user && object.user.avatar_template; end end # Run a data explorer query on the currently connected database.