After upgrading the prosemirror-state to a particuler version(“1.4.2”), facing issue while checking the condition if(selection instanceof TextSelection), This condition never satisfies even if the selection is a TextSelection. if ( selection instanceof TextSelection && prevState.selection instanceof TextSelection ) { const currentPos = selection.$cursor ? selection.$cursor.pos : selection.$to.pos; const para = findParentNodeClosestToPos( nextState.doc.resolve(currentPos), (node) => { return node.type === schema.nodes.paragraph; } );
Any help is appreciated. Thanks in advance.