You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include a complex object containing symbols in the template, such as forever-agent.
Current Behavior
The traverse library introduced iteration over symbols in version 0.6.8. Previously, they only iterated over strings.
This now breaks during parsing when the template contains a symbol on the line
. Calling 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 strings.
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.
Steps to reproduce
Include a complex object containing
symbol
s in the template, such as forever-agent.Current Behavior
The
traverse
library introduced iteration oversymbol
s in version 0.6.8. Previously, they only iterated overstring
s.This now breaks during parsing when the template contains a
symbol
on the lineloopback-connector-rest/lib/template.js
Line 52 in 3d0ea7b
RegExp.exec()
on asymbol
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 thetraverse
library previously only providedstring
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.
ljharb/js-traverse#5
The text was updated successfully, but these errors were encountered: