Description
Steps to reproduce
Include a complex object containing symbol
s in the template, such as forever-agent.
Current Behavior
The traverse
library introduced iteration over symbol
s in version 0.6.8. Previously, they only iterated over string
s.
This now breaks during parsing when the template contains a symbol
on the line
loopback-connector-rest/lib/template.js
Line 52 in 3d0ea7b
RegExp.exec()
on a symbol
throws an error.
Expected Behavior
It's not clear to me what the expected behavior should be, but I think the type of the item
should be checked, as the traverse
library previously only provided string
s.
Link to reproduction sandbox
https://github.com/MartyJRE/loopback-sandbox-traverse
Additional information
linux x64 16.13.1
[email protected] /home/martin/Documents/Code/loopback-sandbox-traverse
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
Related Issues
I filed an issue with the traverse library as well, but I'm unsure whether they'll consider this a problem as for them it isn't neceserally a breaking change.