Skip to content

Commit

Permalink
fix(selection): fix undefined detection
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed May 25, 2018
1 parent 8bbfb08 commit 2ad9269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_helpers/selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function getDefaultSelectionInfo (extra: Partial<SelectionInfo> = {}): Se
}

export function isSameSelection (a: SelectionInfo, b: SelectionInfo) {
return a.text === b.text && a.context === b.context
return a && b && a.text === b.text && a.context === b.context
}

export function getSelectionInfo (): SelectionInfo {
Expand Down

0 comments on commit 2ad9269

Please sign in to comment.