code review re. 3628de7a9d

This commit is contained in:
gorhill 2016-10-29 08:42:29 -04:00
parent 3628de7a9d
commit de3054b485

View file

@ -1046,7 +1046,13 @@ var readUserAsset = function(path, callback) {
var saveUserAsset = function(path, content, callback) {
var bin = {};
bin[path] = content;
vAPI.storage.set(bin, callback);
var onSaved;
if ( callback instanceof Function ) {
onSaved = function() {
callback({ path: path, content: content });
};
}
vAPI.storage.set(bin, onSaved);
};
/******************************************************************************/