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 +1 -1
- package/static/lib/composer.js +3 -3
package/package.json
CHANGED
package/static/lib/composer.js
CHANGED
|
@@ -431,8 +431,8 @@ define('composer', [
|
|
|
431
431
|
|
|
432
432
|
async function getSelectedCategory(postData) {
|
|
433
433
|
const { template } = ajaxify.data;
|
|
434
|
-
const cid =
|
|
435
|
-
if ((template.category || template.world) && cid ===
|
|
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 &&
|
|
685
|
+
var isCategorySelected = !checkTitle || (checkTitle && postData.cid);
|
|
686
686
|
|
|
687
687
|
// Specifically for checking title/body length via plugins
|
|
688
688
|
var payload = {
|