LoadingManager.getHandler does not work half the time if a regex with g flag is passed
See original GitHub issueIf adding a handler with a regex that has the g
flag, the regex.test
in getHandler
will return null every other time.
I think string.match
should be used rather than regex.test
to avoid any side effect like this
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
LoadingManager – three.js docs
LoadingManager. Handles and keeps track of loaded and pending data. A default global instance of this class is created and used by loaders...
Read more >What is the meaning of the 'g' flag in regular expressions?
The "g" flag indicates that the regular expression should be tested against all possible matches in a string. Without the g flag, ...
Read more >Regular Expressions :: Eloquent JavaScript
Regular expression objects have a number of methods. The simplest one is test . If you pass it a string, it will return...
Read more >Diff - 49e3b372ab288992a4705dfe7f37fbd732d06aed^^1^2 ...
-244,12 +244,12 @@ * on {@link ListFragment} for most of its work. ... //Do it a bit earlier than half the lease duration...
Read more >Sets and ranges [...] - The Modern JavaScript Tutorial
The regular expression engine thinks that [XY] – are not two, but four characters: left half of X (1) ,; right half of...
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 FreeTop 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
Top GitHub Comments
@makc Using
lastIndex
seems like an appropriate solution 👍Could you share an example to reproduce this issue?