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

Seems to break on an array of strings #40

Open
chmac opened this issue Mar 1, 2023 · 0 comments
Open

Seems to break on an array of strings #40

chmac opened this issue Mar 1, 2023 · 0 comments

Comments

@chmac
Copy link

chmac commented Mar 1, 2023

Slightly modifying the example from the readme like so:

const results = format([
  {
    item: {
      titles: ["Monster 1959", "Second Title"],
      author: { firstName: "David", lastName: "Maine" },
    },
    matches: [
      {
        indices: [[1, 2]],
        value: "Monster 1959",
        key: "title",
        arrayIndex: 0,
      },
    ],
  },
]);

I think the code doesn't follow the refIndex property from fuse on title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant