Return value of matchRecursive() has changed in version 5.1.1 if no matches were found
gizmodus opened this issue · 2 comments
First, thanks for the great library. We extensively use XRegExp in our project. We just upgraded the version from 5.0.2 to 5.1.1 and noticed that our unit tests fail now. Further investigation revealed that the behavior of matchRecursive() has changed in version 5.1.1 in situations where no match was found.
Return value of matchRecursive() if no matches are found:
Version 5.0.2:
An array with a single object of type "between" is returned.
Version 5.1.1:
An empty array is returned.
Is this change intended?
Yes, this change is intended and is included in the 5.1.0 release notes. At the time, I felt this was too small and edge-casey to warrant a bump to v6.0, which might have been the wrong decision. I'm sorry this created a problem for you!