Skip to content

vue-router document page search error #1738

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

Closed
falstack opened this issue Sep 15, 2017 · 5 comments
Closed

vue-router document page search error #1738

falstack opened this issue Sep 15, 2017 · 5 comments
Labels

Comments

@falstack
Copy link

Version

2.7.0

Reproduction link

https://router.vuejs.org/en/

Steps to reproduce

open this Reproduction link in prev step

use search input

open chrome console

look error stack

What is expected?

search is broken

What is actually happening?

 TypeError: Cannot read property 'tf' of undefined
    at t.Index.documentVector (lunr.min.js:7)
    at t.Index.<anonymous> (lunr.min.js:7)
    at Array.map (<anonymous>)
    at t.SortedSet.map (lunr.min.js:7)
    at t.Index.search (lunr.min.js:7)
    at LunrSearchEngine.search (search-lunr.js:34)
    at Object.query (search-engine.js:31)
    at launchSearch (search.js:79)
    at handleUpdate (search.js:121)
    at HTMLInputElement.<anonymous> (search.js:142)

It's long time

@posva posva added the docs label Sep 15, 2017
@eperedo
Copy link

eperedo commented Oct 22, 2017

Looks like lunr.js can't handle emojis correctly.
olivernn/lunr.js#243 (comment)

So I think there are two solutions, either:

Or

  • Not include emojis in search_index.json

I can help with this but in case you guys want the second solution I need more information in how index are generated.

@falstack
Copy link
Author

@eperedo sorry, i forgot this message:

when you enter chinese char, the bug will show!

@eperedo
Copy link

eperedo commented Oct 24, 2017

@falstack Not sure how to reproduce the chinese char, something like this?
captura de pantalla 2017-10-23 a la s 22 20 53

@falstack
Copy link
Author

@eperedo like this:

kapture 2017-10-24 at 11 47 22

@posva
Copy link
Member

posva commented Oct 24, 2017

Fixed in e5778d7
Will be deployed shortly

@posva posva closed this as completed Oct 24, 2017
posva added a commit that referenced this issue Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants