Skip to content

Commit

Permalink
Fix a bug that prevented textbox input from working
Browse files Browse the repository at this point in the history
  • Loading branch information
ninegua committed Jun 29, 2021
1 parent 50ee99f commit 387a427
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function toggle_input(e) {
}

function prepare_text() {
message = document.getElementById("message");
const message = document.getElementById("message");
try {
let value = JSON.parse(message.value);
if (typeof value == "object") {
Expand Down Expand Up @@ -280,11 +280,6 @@ async function main() {
}
} catch (err) {
clear_result();
const div = document.getElementById("result");
const pre = document.createElement("pre");
result.appendChild(pre);
pre.innerText = "Cannot get camera: \n" + err;
document.body.appendChild(div);
toggle_input();
const scan_button = document.getElementById("scan");
scan_button.innerText = "(video disabled)";
Expand Down

0 comments on commit 387a427

Please sign in to comment.