question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select multiple - search in items : error value.match is not a function (due to SafeHtmlImpl)

See original GitHub issue

Hello

In “select multiple”, when you search an items (input text), I’ve an error :

EXCEPTION: Error in ./SelectComponent class SelectComponent - inline template:106:19 caused by: t.match is not a function

(Chrome & FF + Angular Final 2.0.0) Same issue with your demo.

The error is into the HighlightPipe : var tagList = value.match(tagRE); due to value is not a string but instance of SafeHtmlImpl

I don’t known if it’s the best soltuion, but you could fix it with :

        if (value instanceof SafeHtmlImpl) {
            value = value.changingThisBreaksApplicationSecurity;
        }

thkx

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:17

github_iconTop GitHub Comments

6reactions
Scipionhcommented, Oct 3, 2016

Any news on this ?

6reactions
Scipionhcommented, Sep 23, 2016

I can’t highlight enough, how important it is to fix this asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript error: "val.match is not a function" - Stack Overflow
I have a similar issue, in my case, I am validating that the value is a number and not an alphabet, will converting...
Read more >
Regular expressions
Regular expressions are a concise and flexible tool for describing patterns in strings. This vignette describes the key features of stringr's regular ...
Read more >
PHP preg_match_all() Function - W3Schools
Indicates how far into the string to begin searching. The preg_match() function will not find matches that occur before the position given in...
Read more >
Regular Expressions :: Eloquent JavaScript
Dynamically creating RegExp objects. There are cases where you might not know the exact pattern you need to match against when you are...
Read more >
SyntaxError: invalid regular expression flag "x" - MDN Web Docs
y, Perform a "sticky" search that matches starting at the current ... The code below is incorrect, because W , e and b...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found