I have two functions returning promises and I'm using them independently as:
getLocal().then(...)
and
getWeb().then(...)
However now I ran into a weird problem:
1) I need a third function that returns a promise
2) The function must first check if getLocal() has the data. If it has, then return this promise.
3) If getLocal() doesn't have the data, then return the promise of getWeb()
Hope I'm clearer... any help?