-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): isNodeSelection, isTextSelection not always false (#3089)
Fixes #2979. Since the ProseMirror TypeScript upgrade, these have always returned false, since the Selection type tree are all classes now.
- Loading branch information
Showing
5 changed files
with
2 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import { NodeSelection } from 'prosemirror-state' | ||
|
||
import { isObject } from '../utilities/isObject' | ||
|
||
export function isNodeSelection(value: unknown): value is NodeSelection { | ||
return isObject(value) && value instanceof NodeSelection | ||
return value instanceof NodeSelection | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import { TextSelection } from 'prosemirror-state' | ||
|
||
import { isObject } from '../utilities/isObject' | ||
|
||
export function isTextSelection(value: unknown): value is TextSelection { | ||
return isObject(value) && value instanceof TextSelection | ||
return value instanceof TextSelection | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.