Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Type error in addOptions when extending extension (regression introduced in 2.10.0) #5852

Closed
1 task done
Mathias-S opened this issue Nov 21, 2024 · 1 comment · Fixed by #5854
Closed
1 task done
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@Mathias-S
Copy link
Contributor

Mathias-S commented Nov 21, 2024

Affected Packages

@tiptap/extension-link

Version(s)

2.10.0

Bug Description

When trying to extend certain extensions, such as @tiptap/extension-link, using addOptions and ...this.parent?.(), v2.10.0 has introduced an error in code that previously worked fine:

import Link from "@tiptap/extension-link";

const MyLink = Link.extend({
  addOptions() { // TypeError here
    return {
      ...this.parent?.(),
    };
  },
});

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Since this is very similar to code in the docs, I expect this to work without any errors. Alternatively, there should be another way to extend Link without having to provide all options.

Additional Context (Optional)

Probably a regression caused by the commits related to #5768

Dependency Updates

  • Yes, I've updated all my dependencies.
@Mathias-S Mathias-S added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Nov 21, 2024
nperez0111 added a commit that referenced this issue Nov 21, 2024
nperez0111 added a commit that referenced this issue Nov 21, 2024
@nperez0111
Copy link
Contributor

Thanks for pointing this out. Resolved with: https://github.com/ueberdosis/tiptap/releases/tag/v2.10.1

nperez0111 added a commit that referenced this issue Nov 22, 2024
… are partials on an extended config #5852 (#5854)"

This reverts commit 87d63d8.
nperez0111 added a commit that referenced this issue Nov 22, 2024
* revert: "fix(core): update the typings to be that options and storage are partials on an extended config #5852 (#5854)"

This reverts commit 87d63d8.

* revert: "fix(core): update the typing of `addOptions`, `addStorage` to have an optional parent #5768 (#5770)"

This reverts commit d2f366d.
gethari pushed a commit to gethari/tiptap that referenced this issue Nov 23, 2024
…osis#5860)

* revert: "fix(core): update the typings to be that options and storage are partials on an extended config ueberdosis#5852 (ueberdosis#5854)"

This reverts commit 87d63d8.

* revert: "fix(core): update the typing of `addOptions`, `addStorage` to have an optional parent ueberdosis#5768 (ueberdosis#5770)"

This reverts commit d2f366d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
2 participants