mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-03 20:14:31 +00:00
First attempt at comma based preference collector
This commit is contained in:
@@ -39,6 +39,10 @@ export function getVariable(name, defaultValue = null) {
|
||||
return getter.getByName(name).then((response) => {
|
||||
return Promise.resolve(parseResponse(name, response));
|
||||
}).catch((error) => {
|
||||
if('' === defaultValue) {
|
||||
// do not try to store empty strings.
|
||||
return Promise.resolve(defaultValue);
|
||||
}
|
||||
// preference does not exist (yet).
|
||||
// POST it and then return it anyway.
|
||||
let poster = (new Post);
|
||||
|
||||
Reference in New Issue
Block a user