Topic.inject({
	POST_FIRST_STICKY: true,

	initialize: function() {
		// A topic cannot be created without a first post.
		var post = new Post();
		// tell it that it's the first post in a node
		post.isFirst = true;
		// Add it
		this.posts.add(post);
		// make it visible
		this.visible = true;
	},

	getFirstPost: function() {
		return this.posts.get(0);
	},

	getEditForm: function(param) {
		// Redirect to the first post if we're creating a new post and not removing
		// it. In those cases we need the node form for meta data.
		if (!param.removing && this.isCreating()) { 
			return this.getFirstPost().getEditForm(param); 
		} else {
			param.children = false;
			param.resources = false;
			// Call this.base for param.posts
			param.posts = true;
			var form = this.base(param);
			form.removeTab('node');
			return form;
		}
	},

	/**
	 * This is called from Post#onApply
	 */
	onUpdateFirstPost: function(post, changedItems) {
		if (changedItems.title)
			this.setTitle(post.title);
		if (changedItems.creationDate)
			this.creationDate = post.creationDate;
	},

	/**
	 * This is called from Post#onRemove, if there's only one post left.
	 * For Topics, this means remove the topic node as well.
	 */
	onRemoveLastPost: function() {
		this.remove();
	},

	isEditableBy: function(user, item) {
		// Allow anonymous users to edit posts if POST_ANONYMOUS is set to true
		// for this node.
		return item == 'posts' && (user && user.hasRole(UserRole.POST)
				|| !user && this.POST_ANONYMOUS)
				// Otherwise delegate to the first post as this is just a container for it
				|| this.getFirstPost().isEditableBy(user, item);
	},

	getTitle: function() {
		var post = this.getFirstPost();
		return post ? post.title : null;
	},

	setTitle: function(title) {
		// If the title of the first post was changed, update the unique name of the node
		this.name  = this.getParentNode().getUniqueChildName(this,
				title, (app.properties.maxNameLength || 64).toInt());
	},

	getDisplayName: function() {
		return this.getTitle();
	},

	renderUser: function(out) {
		var post = this.getFirstPost();
		return post ? post.renderUser(out) : '';
	},

	render: function(param, out) {
		var first = this.getFirstPost();
		return first ? first.render(param, out) : '';
	}
});
@@ -576,19 +576,23 @@
 )) %7B
- 
 %0A%09%09%09
-return
+var first =
  thi
@@ -607,16 +607,42 @@
 stPost()
+;%0A%09%09%09return first && first
 .getEdit
@@ -653,17 +653,16 @@
 (param);
- 
 %0A%09%09%7D els
@@ -1422,16 +1422,29 @@
 s node.%0A
+%09%09var first;%0A
 %09%09return
@@ -1622,16 +1622,25 @@
 t%0A%09%09%09%09%7C%7C
+ (first =
  this.ge
@@ -1651,16 +1651,26 @@
 stPost()
+) && first
 .isEdita
@@ -1715,34 +1715,35 @@
 ction() %7B%0A%09%09var 
-po
+fir
 st = this.getFir
@@ -1761,25 +1761,27 @@
 %09return 
-po
+fir
 st ? 
-po
+fir
 st.title
@@ -2123,26 +2123,27 @@
 ut) %7B%0A%09%09var 
-po
+fir
 st = this.ge
@@ -2169,17 +2169,19 @@
 urn 
-po
+fir
 st ? 
-po
+fir
 st.r

Check if getFirstPost() actually returns something everywhere.