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.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user