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:
parent
3628de7a9d
commit
de3054b485
@ -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);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user