mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
code review re. 3628de7a9d
This commit is contained in:
parent
3628de7a9d
commit
de3054b485
1 changed files with 7 additions and 1 deletions
|
@ -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 a new issue