return false when provider not set

This commit is contained in:
Jonathan Rainville 2018-09-11 17:10:06 -04:00
parent d5b34ad396
commit 201a1bfd23
2 changed files with 4 additions and 1 deletions

View File

@ -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();
}; };

View File

@ -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();
}; };