return false when provider not set
This commit is contained in:
parent
d5b34ad396
commit
201a1bfd23
|
@ -20,6 +20,9 @@ Messages.setProvider = function (providerName, options) {
|
|||
};
|
||||
|
||||
Messages.isAvailable = function () {
|
||||
if (!this.currentMessages) {
|
||||
return false;
|
||||
}
|
||||
return this.currentMessages.isAvailable();
|
||||
};
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ Storage.setProvider = function (providerName, options) {
|
|||
|
||||
Storage.isAvailable = function () {
|
||||
if (!this.currentStorage) {
|
||||
throw new Error(this.noProviderError);
|
||||
return false;
|
||||
}
|
||||
return this.currentStorage.isAvailable();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue