Remove unused parameter in Fragment.findIndex #88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ocavue/clean-find-index-round"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While reading the source code of
prosemirror-model, I noticed all calls to.findIndex()only use the first parameter (search result link). The second parameterroundis unused thus can be removed. This method is an internal API so it shouldn't be a breaking change.This is a public function, meaning there will be calls to it in code outside the repository, which may well be using this parameter. As such, and also since the savings of this change are minimal and it removes a useful feature, I don't think it's a good idea to remove it.
It seems to be an internal method based on the comments and this commit
github.com/ProseMirror/prosemirror-model@d326751964Oh right, it has a doc comment but is marked @internal after all. Well, I suppose we can remove this parameter then.