mirror of
https://github.com/embarklabs/EmbarkJS.git
synced 2025-01-24 03:09: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 () {
|
Messages.isAvailable = function () {
|
||||||
|
if (!this.currentMessages) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return this.currentMessages.isAvailable();
|
return this.currentMessages.isAvailable();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ Storage.setProvider = function (providerName, options) {
|
|||||||
|
|
||||||
Storage.isAvailable = function () {
|
Storage.isAvailable = function () {
|
||||||
if (!this.currentStorage) {
|
if (!this.currentStorage) {
|
||||||
throw new Error(this.noProviderError);
|
return false;
|
||||||
}
|
}
|
||||||
return this.currentStorage.isAvailable();
|
return this.currentStorage.isAvailable();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user