Skip to content

Commit

Permalink
fix instace-> instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ishiko732 committed Nov 24, 2024
1 parent 99a181b commit e703177
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/fsrs/fsrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export class FSRS extends FSRSAlgorithm {
now: DateInput,
afterHandler?: (recordLog: IPreview) => R
): R {
const instace = this.getScheduler(card, now)
const recordLog = instace.preview()
const instance = this.getScheduler(card, now)
const recordLog = instance.preview()
if (afterHandler && typeof afterHandler === 'function') {
return afterHandler(recordLog)
} else {
Expand Down Expand Up @@ -229,12 +229,12 @@ export class FSRS extends FSRSAlgorithm {
grade: Grade,
afterHandler?: (recordLog: RecordLogItem) => R
): R {
const instace = this.getScheduler(card, now)
const instance = this.getScheduler(card, now)
const g = TypeConvert.rating(grade)
if (g === Rating.Manual) {
throw new Error('Cannot review a manual rating')
}
const recordLogItem = instace.review(g)
const recordLogItem = instance.review(g)
if (afterHandler && typeof afterHandler === 'function') {
return afterHandler(recordLogItem)
} else {
Expand Down

0 comments on commit e703177

Please sign in to comment.