nodebb-plugin-mentions 4.6.4 → 4.6.5

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/library.js CHANGED
@@ -416,7 +416,7 @@ Mentions.parseRaw = async (content, type = 'default') => {
416
416
  }
417
417
 
418
418
  // Note: Mentions.clean explicitly can't be called here because I need the content unstripped
419
- let { splitContent, matches, urlMap } = await getMatches(content);
419
+ let { splitContent, matches, urlMap } = await getMatches(content, true);
420
420
 
421
421
  if (!matches.length && !urlMap.size) {
422
422
  return content;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-mentions",
3
- "version": "4.6.4",
3
+ "version": "4.6.5",
4
4
  "description": "NodeBB Plugin that allows users to mention other users by prepending an '@' sign to their username",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -43,7 +43,7 @@ $(document).ready(function () {
43
43
  const localMatches = localUserList.filter(
44
44
  u => u.username.toLocaleLowerCase().startsWith(termLowerCase)
45
45
  );
46
- const categoryMatches = categoryList.filter(c => c.handle.startsWith(termLowerCase));
46
+ const categoryMatches = categoryList.filter(c => c && c.handle && c.handle.startsWith(termLowerCase));
47
47
 
48
48
  // remove local matches from search results, add category matches
49
49
  users = users.filter(u => !localMatches.find(lu => lu.uid === u.uid));