Select multiple - search in items : error value.match is not a function (due to SafeHtmlImpl)
See original GitHub issueHello
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:
- Created 7 years ago
- Reactions:4
- Comments:17
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any news on this ?
I can’t highlight enough, how important it is to fix this asap.