Skip to content

Commit 134e314

Browse files
committed
[CM2] Fix post links by passing the same post reference in category
1 parent 3fbc18c commit 134e314

File tree

1 file changed

+4
-6
lines changed
  • src/compiler/contentModel2/models/collection

1 file changed

+4
-6
lines changed

src/compiler/contentModel2/models/collection/category.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,10 @@ module.exports = function Category(settings = defaultSettings, level = 1) {
148148
return
149149
}
150150
if (childModels.post.match(childNode)) {
151-
tree.levelPosts.push(
152-
childModels.post.create(childNode, childContext)
153-
)
154-
return tree.posts.push(
155-
childModels.post.create(childNode, childContext)
156-
)
151+
const post = childModels.post.create(childNode, childContext)
152+
tree.levelPosts.push(post)
153+
tree.posts.push(post)
154+
return
157155
}
158156
if (Category().match(childNode)) {
159157
const SubCategoryModel = Category({

0 commit comments

Comments
 (0)