mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-16 21:40:23 +01:00
Compare commits
4 Commits
normalize-
...
v1.11.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab5035f4e2 | ||
|
|
2555d72c84 | ||
|
|
213582df8b | ||
|
|
543336070a |
@@ -2,7 +2,7 @@
|
||||
"name": "nodebb",
|
||||
"license": "GPL-3.0",
|
||||
"description": "NodeBB Forum",
|
||||
"version": "1.10.2",
|
||||
"version": "1.11.0",
|
||||
"homepage": "http://www.nodebb.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -80,7 +80,7 @@
|
||||
"mubsub-nbb": "^1.5.0",
|
||||
"nconf": "^0.10.0",
|
||||
"nodebb-plugin-composer-default": "6.1.10",
|
||||
"nodebb-plugin-dbsearch": "3.0.0",
|
||||
"nodebb-plugin-dbsearch": "3.0.3",
|
||||
"nodebb-plugin-emoji": "^2.2.5",
|
||||
"nodebb-plugin-emoji-android": "2.0.0",
|
||||
"nodebb-plugin-markdown": "8.8.5",
|
||||
@@ -169,4 +169,4 @@
|
||||
"url": "https://github.com/barisusakli"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,12 +335,14 @@ Categories.flattenCategories = function (allCategories, categoryData) {
|
||||
*/
|
||||
Categories.getTree = function (categories, parentCid) {
|
||||
parentCid = parentCid || 0;
|
||||
const cids = categories.map(category => category.cid);
|
||||
const cids = categories.map(category => category && category.cid);
|
||||
const cidToCategory = {};
|
||||
const parents = {};
|
||||
cids.forEach((cid, index) => {
|
||||
cidToCategory[cid] = categories[index];
|
||||
parents[cid] = _.clone(categories[index]);
|
||||
if (cid) {
|
||||
cidToCategory[cid] = categories[index];
|
||||
parents[cid] = _.clone(categories[index]);
|
||||
}
|
||||
});
|
||||
|
||||
const tree = [];
|
||||
|
||||
@@ -47,11 +47,11 @@ module.require = function (p) {
|
||||
if (err.code === 'MODULE_NOT_FOUND') {
|
||||
let stackLine = err.stack.split('\n');
|
||||
stackLine = stackLine.find(line => line.includes('nodebb-plugin') || line.includes('nodebb-theme'));
|
||||
winston.warn('[plugins/require] ' + err.message + ', please update your plugin!\n' + stackLine);
|
||||
var deprecatedPath = err.message.replace('Cannot find module ', '');
|
||||
winston.warn('[deprecated] requiring core modules with `module.parent.require(' + deprecatedPath + ')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.\n' + stackLine);
|
||||
if (path.isAbsolute(p)) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
return defaultRequire.apply(module, [path.join('../', p)]);
|
||||
}
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user