(webext) support for vAPI.adminStorage is optional

This commit is contained in:
gorhill 2016-10-15 09:32:33 -04:00
parent ba18b3aa02
commit 5a50708961

View file

@ -807,6 +807,12 @@
// values are left to the user's choice. // values are left to the user's choice.
µBlock.restoreAdminSettings = function(callback) { µBlock.restoreAdminSettings = function(callback) {
// Support for vAPI.adminStorage is optional (webext).
if ( vAPI.adminStorage instanceof Object === false ) {
callback();
return;
}
var onRead = function(json) { var onRead = function(json) {
var µb = µBlock; var µb = µBlock;
var data; var data;