From 648ae37ff48de15eb4073befcc155a3b201bf169 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 3 Sep 2019 15:58:05 +0200 Subject: [PATCH] make DocumentOffset compatible with what is returned from dom/getCaret so we can return a DocumentOffset from there without breakage --- src/editor/offset.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/editor/offset.js b/src/editor/offset.js index 7054836bdc..c638640f6f 100644 --- a/src/editor/offset.js +++ b/src/editor/offset.js @@ -15,12 +15,12 @@ limitations under the License. */ export default class DocumentOffset { - constructor(offset, atEnd) { + constructor(offset, atNodeEnd) { this.offset = offset; - this.atEnd = atEnd; + this.atNodeEnd = atNodeEnd; } asPosition(model) { - return model.positionForOffset(this.offset, this.atEnd); + return model.positionForOffset(this.offset, this.atNodeEnd); } }