nodebb-plugin-composer-default 10.2.48 → 10.2.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.2.48",
3
+ "version": "10.2.49",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -431,8 +431,8 @@ define('composer', [
431
431
 
432
432
  async function getSelectedCategory(postData) {
433
433
  const { template } = ajaxify.data;
434
- const cid = parseInt(postData.cid, 10);
435
- if ((template.category || template.world) && cid === parseInt(ajaxify.data.cid, 10)) {
434
+ const { cid } = postData;
435
+ if ((template.category || template.world) && String(cid) === String(ajaxify.data.cid)) {
436
436
  // no need to load data if we are already on the category page
437
437
  return ajaxify.data;
438
438
  } else if (cid) {
@@ -682,7 +682,7 @@ define('composer', [
682
682
  var action = postData.action;
683
683
 
684
684
  var checkTitle = (postData.hasOwnProperty('cid') || parseInt(postData.pid, 10)) && postContainer.find('input.title').length;
685
- var isCategorySelected = !checkTitle || (checkTitle && parseInt(postData.cid, 10));
685
+ var isCategorySelected = !checkTitle || (checkTitle && postData.cid);
686
686
 
687
687
  // Specifically for checking title/body length via plugins
688
688
  var payload = {