aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-02-02 11:33:56 +0100
committerache <ache@ache.one>2019-02-02 11:33:56 +0100
commit550462647f1f330d72853a546767f3869a6bae94 (patch)
tree7b0a67d2d1df8d20b4cc5c86de1b56e59e050126
parentNew code (diff)
Fix empty input
-rw-r--r--static/synhestesis.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/static/synhestesis.js b/static/synhestesis.js
index 209e896..a665350 100644
--- a/static/synhestesis.js
+++ b/static/synhestesis.js
@@ -88,7 +88,9 @@ function loadFile( str ) {
if( ev.shiftKey ) {
pass();
} else {
- inputAnswer.change();
+ if( inputAnswer.value ) {
+ inputAnswer.change();
+ }
}
}
}
@@ -99,7 +101,6 @@ function loadFile( str ) {
if( res.answer[indexRes].value != undefined && res.answer[indexRes].value == inputAnswer.value )
valid = true;
else if( res.answer[indexRes].values != undefined ) {
- console.log("Hello");
console.log( res.answer[indexRes].values )
if( res.answer[indexRes].values.indexOf(inputAnswer.value) != -1 )
valid = true;