mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 08:38:14 +02:00
Merge branch 'master' of https://github.com/NodeBB/NodeBB
This commit is contained in:
2
app.js
2
app.js
@@ -124,7 +124,7 @@ function start() {
|
||||
nconf.set('secure', urlObject.protocol === 'https:');
|
||||
nconf.set('use_port', !!urlObject.port);
|
||||
nconf.set('relative_path', relativePath);
|
||||
nconf.set('port', urlObject.port || nconf.get('port') || nconf.get('PORT') || 4567);
|
||||
nconf.set('port', urlObject.port || nconf.get('port') || nconf.get('PORT') || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567);
|
||||
nconf.set('upload_url', nconf.get('upload_path').replace(/^\/public/, ''));
|
||||
|
||||
if (nconf.get('isPrimary') === 'true') {
|
||||
|
||||
@@ -75,7 +75,7 @@ define('search', ['navigator', 'translator'], function(nav, translator) {
|
||||
|
||||
Search.getSearchPreferences = function() {
|
||||
try {
|
||||
return JSON.parse(localStorage.getItem('search-preferences'));
|
||||
return JSON.parse(localStorage.getItem('search-preferences') || '{}');
|
||||
} catch(e) {
|
||||
return {};
|
||||
}
|
||||
@@ -179,4 +179,4 @@ define('search', ['navigator', 'translator'], function(nav, translator) {
|
||||
};
|
||||
|
||||
return Search;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user