Skip to content
Snippets Groups Projects
Commit 4399483a authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] fix #471

parent b811e1d7
Branches
Tags
No related merge requests found
......@@ -85,12 +85,12 @@ angular.module('cesium.storage.services', ['ngResource', 'ngResource', 'ngApi',
// Set a object to the secure storage
exports.secure.setObject = function(key, value) {
return exports.secure.set(key, JSON.stringify(value));
return exports.secure.put(key, value ? JSON.stringify(value) : undefined);
};
// Get a object from the secure storage
exports.secure.getObject = function(key) {
return exports.secure.get(key)
return exports.secure.storage.get(key)
.then(function(value) {
return (value && JSON.parse(value)) || {};
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment