summaryrefslogtreecommitdiff
path: root/ext/bg/js/ankiweb.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/ankiweb.js')
-rw-r--r--ext/bg/js/ankiweb.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/ankiweb.js b/ext/bg/js/ankiweb.js
index ce909fcf..11142637 100644
--- a/ext/bg/js/ankiweb.js
+++ b/ext/bg/js/ankiweb.js
@@ -61,6 +61,10 @@ class AnkiWeb {
}
authenticate() {
+ if (this.username.length === 0 || this.password.length === 0) {
+ return Promise.reject('missing login credentials');
+ }
+
if (this.logged) {
return Promise.resolve(true);
}