Skip to content

Commit

Permalink
Making text property required
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Aug 16, 2019
1 parent c394e04 commit b59c867
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/word.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function WordPlugin(): Plugin {
}

interface TextRange extends Range {
text?: string;
text: string;
}

function findWordAtOffset(
Expand Down Expand Up @@ -61,7 +61,7 @@ function findWordAtFocus(

const path = focus.path.toArray();

const range: TextRange = Range.create({
const range = Range.create({
anchor: {
offset: start,
path
Expand All @@ -70,7 +70,7 @@ function findWordAtFocus(
offset: end,
path
}
});
}) as TextRange;

range.text = text;

Expand Down

0 comments on commit b59c867

Please sign in to comment.