strapi-plugin-comments 2.2.8 → 2.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -154,9 +154,12 @@ module.exports = ({ strapi }) => ({
154
154
  ? populateClause.authorUser.populate
155
155
  : populateClause.authorUser;
156
156
  }
157
+ const primitiveThreadOf = (0, lodash_1.isString)(parsedThreadOf) || (0, lodash_1.isNumber)(parsedThreadOf) ?
158
+ parsedThreadOf :
159
+ null;
157
160
  return this.sanitizeCommentEntity({
158
161
  ..._,
159
- threadOf: parsedThreadOf || _.threadOf || null,
162
+ threadOf: primitiveThreadOf || _.threadOf,
160
163
  gotThread: (threadedItem?.itemsInTread || 0) > 0,
161
164
  threadFirstItemId: threadedItem?.firstThreadItemId,
162
165
  }, doNotPopulateAuthor, authorUserPopulate);