mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 06:25:07 +00:00
monkey patch memdown to allow save empty strings
This commit is contained in:
parent
e2f8ac3070
commit
db281c8b65
13
app.js
13
app.js
@ -180,9 +180,16 @@ Steppy(
|
|||||||
|
|
||||||
logger.log('Server config:', JSON.stringify(app.config, null, 4));
|
logger.log('Server config:', JSON.stringify(app.config, null, 4));
|
||||||
|
|
||||||
db.init(app.config.paths.db, {
|
var dbBackend = require(app.config.storage.backend);
|
||||||
db: require(app.config.storage.backend)
|
|
||||||
}, this.slot());
|
// monkey patch memdown to allow save empty strings which is correct
|
||||||
|
// at general but occasionally not allowed at _checkKey
|
||||||
|
// https://github.com/Level/abstract-leveldown/issues/74
|
||||||
|
if (app.config.storage.backend === 'memdown') {
|
||||||
|
dbBackend.prototype._checkKey = _.noop;
|
||||||
|
}
|
||||||
|
|
||||||
|
db.init(app.config.paths.db, {db: dbBackend}, this.slot());
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
// load all projects for the first time
|
// load all projects for the first time
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
"gulp-react-jade-amd": "git://github.com/vladimir-polyakov/gulp-react-jade-amd",
|
"gulp-react-jade-amd": "git://github.com/vladimir-polyakov/gulp-react-jade-amd",
|
||||||
"jade": "1.11.0",
|
"jade": "1.11.0",
|
||||||
"main-bower-files": "2.7.0",
|
"main-bower-files": "2.7.0",
|
||||||
"memdown": "1.0.0",
|
"memdown": "1.1.0",
|
||||||
"mocha": "1.18.2",
|
"mocha": "1.18.2",
|
||||||
"nci-yaml-reader": "0.1.0",
|
"nci-yaml-reader": "0.1.0",
|
||||||
"nodemon": "1.3.7",
|
"nodemon": "1.3.7",
|
||||||
|
Loading…
Reference in New Issue
Block a user