Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
srtucker22 committed Dec 27, 2020
1 parent 6d598cf commit 9680aed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions src/Cursor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TextOperation } from ".";
import { TextOperation } from '.';

export default class Cursor {
position: number;
Expand All @@ -13,13 +13,15 @@ export default class Cursor {
this.selectionEnd = selectionEnd;
}

static fromJSON(obj: {position: number; selectionEnd: number}) {
static fromJSON(obj: { position: number; selectionEnd: number }) {
return new Cursor(obj.position, obj.selectionEnd);
}

equals(other: Cursor) {
return this.position === other.position &&
this.selectionEnd === other.selectionEnd;
return (
this.position === other.position &&
this.selectionEnd === other.selectionEnd
);
}

// Return the more current cursor information.
Expand All @@ -41,7 +43,9 @@ export default class Cursor {
newIndex -= Math.min(index, ops[i].chars!);
index -= ops[i].chars!;
}
if (index < 0) { break; }
if (index < 0) {
break;
}
}
return newIndex;
}
Expand Down
2 changes: 1 addition & 1 deletion src/TextOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default class TextOperation {
i++;
op = ops[i];
}

if (typeof op === 'number') {
if (op > 0) {
o.retain(op, attributes);
Expand Down

0 comments on commit 9680aed

Please sign in to comment.