Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Jul 6, 2020
1 parent 8d604e1 commit b804b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/y-quill.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ export class QuillBinding {
// always check selection
if (awareness && quillCursors) {
const sel = quill.getSelection()
const aw = awareness.getLocalState()
const aw = /** @type {any} */ (awareness.getLocalState())
if (sel === null) {
if (awareness.getLocalState() !== null) {
awareness.setLocalStateField('cursor', null)
awareness.setLocalStateField('cursor', /** @type {any} */ (null))
}
} else {
const anchor = Y.createRelativePositionFromTypeIndex(type, sel.index)
Expand Down

0 comments on commit b804b1e

Please sign in to comment.