diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.org> | 2025-07-21 18:43:27 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.org> | 2025-07-21 18:43:27 -0400 |
| commit | 232270c94dea176ced18420652c02f2f13dc8af0 (patch) | |
| tree | 936a9fe3771729bd822b50c3011db183f9f8a8c0 | |
| parent | 413e921582d4a58c7329c70f599d2163f82db026 (diff) | |
Fix aliasing issue
| -rw-r--r-- | srs-anywhere.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/srs-anywhere.js b/srs-anywhere.js index 8d587ed..857a541 100644 --- a/srs-anywhere.js +++ b/srs-anywhere.js @@ -184,7 +184,7 @@ function endReview() { downloadJSON(window.allCards); } -function rateCard(difficulty) { +function rateCard(rating) { if (!window.card.revealed) { return; } @@ -195,7 +195,7 @@ function rateCard(difficulty) { const s = card._scheduler.s; const d = card._scheduler.d; const i = card._scheduler.i; - const g = card._flagged ? Grade.forgot : Grade[difficulty]; + const g = card._flagged ? Grade.forgot : Grade[rating]; let s_n = undefined, d_n = undefined, i_n = undefined; @@ -212,7 +212,7 @@ function rateCard(difficulty) { let scheduled = today(); scheduled.setDate(scheduled.getDate() + i_n); - if (difficulty === "forgot") { + if (rating === "forgot") { // Shift forgotten card to end. window.cards.push(card); window.cards.splice(window.index, 1); |