This is an automated email from the ASF dual-hosted git repository. gerben pushed a commit to branch import-dom-seek in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 436b3a09f168c05f22bdfcf9bed004dd81690a15 Author: Gerben <[email protected]> AuthorDate: Fri Nov 20 13:07:16 2020 +0100 Tweak seeker --- packages/dom/src/seek.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dom/src/seek.ts b/packages/dom/src/seek.ts index 75627e9..a1f52c8 100644 --- a/packages/dom/src/seek.ts +++ b/packages/dom/src/seek.ts @@ -83,7 +83,7 @@ export class TextSeeker<TChunk extends Chunk<string>> implements ChunkSeeker<TCh private _readOrSeekToChunk(read: true, target: TChunk, offset?: number): string private _readOrSeekToChunk(read: false, target: TChunk, offset?: number): void - private _readOrSeekToChunk(read: boolean, target: TChunk, offset: number = 0): string { + private _readOrSeekToChunk(read: boolean, target: TChunk, offset: number = 0): string | void { const oldPosition = this.position; let result = ''; @@ -124,8 +124,8 @@ export class TextSeeker<TChunk extends Chunk<string>> implements ChunkSeeker<TCh this.seekTo(oldPosition); result = this.readTo(targetPosition); } + return result; } - return result; } private _readOrSeekTo(read: true, target: number, roundUp?: boolean): string
