summaryrefslogtreecommitdiff
path: root/ext/bg/js/ankiweb.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-10-16 17:56:00 -0700
committerAlex Yatskov <alex@foosoft.net>2016-10-16 17:56:00 -0700
commit16cdb1f13e96d78f712c862db8aae6d9b4d54112 (patch)
treef54039a5166e9363f162b33a0de3a30a7362c4b1 /ext/bg/js/ankiweb.js
parent9eaadd2a6e6b4c3e2ee4eb80103eca78d3c595d5 (diff)
WIP
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);
}