1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Made WebDAV options dynamics so that changing username or password doesn't require restarting the app

This commit is contained in:
Laurent Cozic
2018-03-15 17:57:11 +00:00
parent 9e0bf1acb2
commit 1532b6d159
6 changed files with 22 additions and 12 deletions

View File

@ -44,4 +44,13 @@ ObjectUtils.fieldsEqual = function(o1, o2) {
return true;
}
ObjectUtils.convertValuesToFunctions = function(o) {
const output = {};
for (let n in o) {
if (!o.hasOwnProperty(n)) continue;
output[n] = () => { return typeof o[n] === 'function' ? o[n]() : o[n]; }
}
return output;
}
module.exports = ObjectUtils;