ensure Transform.removeMark() doesn't try to remove a MarkType #18

Merged
jgravois merged 1 commit from patch-2 into master 2021-02-06 22:02:28 +01:00
jgravois commented 2021-02-06 01:43:20 +01:00 (Migrated from github.com)

FIX: Fix an issue where MarkType removal is attempted instead of removing the Mark.

Issue #17


the current release (v1.2.10) throws the following error in my application.

stack: TypeError: style.eq is not a function
      at /Users/john/code/api/node_modules/prosemirror-transform/dist/index.js:1099

github.com/ProseMirror/prosemirror-transform@48cf9d348e/src/mark.js (L67)

Mark.eq > function 👍 
MarkType.eq > undefined

from the looks of it, this was just a typo. i'm guessing my hack of a test hid it because i didn't add marks to the document correctly.

related: github.com/ProseMirror/prosemirror-transform@47cbf5fd88 (r46805194)

FIX: Fix an issue where MarkType removal is attempted instead of removing the Mark. Issue #17 --- the current release (v1.2.10) throws the following error in my application. ``` stack: TypeError: style.eq is not a function at /Users/john/code/api/node_modules/prosemirror-transform/dist/index.js:1099 ``` https://github.com/ProseMirror/prosemirror-transform/blob/48cf9d348e73b560298763b633204dca54e119db/src/mark.js#L67 ``` Mark.eq > function 👍 MarkType.eq > undefined ``` from the looks of it, this was just a typo. i'm guessing my hack of a test hid it because [i didn't add marks to the document correctly](https://github.com/ProseMirror/prosemirror-transform/blob/48cf9d348e73b560298763b633204dca54e119db/test/test-trans.js#L110-L120). related: https://github.com/ProseMirror/prosemirror-transform/commit/47cbf5fd886779058dd4a103ec6da588ae29f053#r46805194
marijnh commented 2021-02-06 22:02:58 +01:00 (Migrated from github.com)

Ugh, yes, I did mean that, but the wrong code somehow also made the test pass. Thanks for noticing this!

Ugh, yes, I did mean that, but the wrong code somehow also made the test pass. Thanks for noticing this!
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!18
No description provided.