Fix dropPoint function #10

Closed
patsimm wants to merge 1 commit from fix-droppoint into master
patsimm commented 2018-06-26 09:09:47 +02:00 (Migrated from github.com)

When I was testing the new dropPoint-function I was not seeing the expected result. Upon further inspection and debugging I found which parts I need to change to make it work.

  • There is nor property length on a Slice but there is a property size - Here I am not 100% sure if the change I made is correct. As far as I understand you do not want to test for a wrapping, if the slice is empty. If that's the case, slice.size should work here.
  • ContentMatch.findWrapping takes a NodeType and not a Node
When I was testing the new dropPoint-function I was not seeing the expected result. Upon further inspection and debugging I found which parts I need to change to make it work. - There is nor property `length` on a `Slice` but there is a property `size` - Here I am not 100% sure if the change I made is correct. As far as I understand you do not want to test for a wrapping, if the `slice` is empty. If that's the case, `slice.size` should work here. - `ContentMatch.findWrapping` takes a `NodeType` and not a `Node`
marijnh commented 2018-06-26 09:21:56 +02:00 (Migrated from github.com)

Thanks for spotting that! I'm confused how the code even passed my (manual, informal) testing at all with those bugs. Merged as a6df195ba3 and released as 1.1.1

Thanks for spotting that! I'm confused how the code even passed my (manual, informal) testing at all with those bugs. Merged as a6df195ba34 and released as 1.1.1

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-transform!10
No description provided.