Skip to content

Node.js based forum software built for the modern web

get a post component by any of its attributes

psychobunny8fcdae7f17ff
diff --git a/public/src/components.js b/public/src/components.js
index 550ef1e539..a31549e694 100644
--- a/public/src/components.js
+++ b/public/src/components.js
@@ -5,7 +5,7 @@ var components = components || {};
(function() {
components.core = {
'post': function(name, value) {
- return $('[data-' + name + '="' + value + '"]');
+ return value ? $('[data-' + name + '="' + value + '"]') $('[data-' + name + ']');
},
'post/content': function(pid) {
var el = components.core.post('pid', pid).find('[component="post/content"]');