Skip to content

Commit b132bbe

Browse files
committed
Fix ScrVers.equals()
1 parent 9d59230 commit b132bbe

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sillsdev/scripture",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "TypeScript partial port of `libpalaso/SIL.Scripture`",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",

src/scr-vers.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ export class ScrVers {
4646
return this._type;
4747
}
4848

49-
clearExcludedVerses(): void {
50-
// do nothing
51-
}
52-
53-
clearVerseSegments(): void {
54-
// do nothing
49+
equals(scrVers: ScrVers): boolean {
50+
if (!scrVers.type || !this.type) return false;
51+
return scrVers.type === this.type;
5552
}
5653
}

src/verse-ref.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ export class VerseRef {
384384
verseRef._chapterNum === this._chapterNum &&
385385
verseRef._verseNum === this._verseNum &&
386386
verseRef._verse === this._verse &&
387-
verseRef.versification === this.versification
387+
verseRef.versification != null &&
388+
this.versification != null &&
389+
verseRef.versification.equals(this.versification)
388390
);
389391
}
390392

0 commit comments

Comments
 (0)