mirror of
https://github.com/embarklabs/EmbarkJS.git
synced 2025-02-19 23:58:16 +00:00
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…
x
Reference in New Issue
Block a user