1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

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);
};
/******************************************************************************/