✅ – dmikester1 – 16-24 Mar 2

I am trying to figure this issue out with this json-storage library. It does not support promises. My environments variable is always coming out empty. I know its because I need to wait for storage.get somehow.
D
dmikester1413d ago
let environments = [];
storage.get('SADT-environtments', function(error, data) {
if (error) throw error;
console.log({data})
environments = JSON.parse(data.environments);
});
console.log({ environments });
let environments = [];
storage.get('SADT-environtments', function(error, data) {
if (error) throw error;
console.log({data})
environments = JSON.parse(data.environments);
});
console.log({ environments });
UU
Unknown User412d ago