nodebb-plugin-dbsearch 6.3.1 → 6.3.3

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.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # NodeBB Plugin DB Search
2
-
3
- A Plugin that lets users search posts and topics
4
-
5
- ## Installation
6
-
7
- npm install nodebb-plugin-dbsearch
8
-
9
-
10
-
1
+ # NodeBB Plugin DB Search
2
+
3
+ A Plugin that lets users search posts and topics
4
+
5
+ ## Installation
6
+
7
+ npm install nodebb-plugin-dbsearch
8
+
9
+
10
+
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';
2
-
3
- module.exports = require('./lib/dbsearch');
4
-
1
+ 'use strict';
2
+
3
+ module.exports = require('./lib/dbsearch');
4
+
package/lib/dbsearch.js CHANGED
@@ -274,6 +274,7 @@ async function reIndexTopics() {
274
274
  async function topicsSave(topics) {
275
275
  topics = topics.filter(
276
276
  t => t && utils.isNumber(t.tid) && parseInt(t.deleted, 10) !== 1 &&
277
+ utils.isNumber(t.cid) &&
277
278
  !pluginConfig.excludeCategories.includes(String(t.cid))
278
279
  );
279
280
 
@@ -330,6 +331,7 @@ async function reIndexPosts() {
330
331
  async function postsSave(posts) {
331
332
  posts = posts.filter(
332
333
  p => p && utils.isNumber(p.pid) && parseInt(p.deleted, 10) !== 1 &&
334
+ utils.isNumber(p.cid) &&
333
335
  !pluginConfig.excludeCategories.includes(String(p.cid))
334
336
  );
335
337