fix stuck in chapter select before finishing chapter

This commit is contained in:
Daniel Bulant 2021-06-20 16:35:20 +02:00
parent f538214dd4
commit a78249e6ee

View file

@ -32,7 +32,7 @@ import Keypress from "../stores/keypress.svelte";
function select(i) { function select(i) {
if(!allowSwitch) return; if(!allowSwitch) return;
var next; var next;
if(d.flags && d.flags.includes("chapters")) { if(d.flags && d.flags.includes("chapters") && chaptersDone.length) {
const keys = Object.keys(chapters); const keys = Object.keys(chapters);
console.log(keys); console.log(keys);
if(!keys[i]) return; if(!keys[i]) return;