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
Similar to #27, after updating to the next version of cedar (0.8.0 in this case), I get an error in an app consuming this addon, but not in the dummy app, nor in JS Fiddle.
After much rage inducing WTF... I've traced that error down to the specification not getting correctly compiled from the template. The vega parser is choking on this line in the spec:
Which should have been transformed to read {"type": "pie", "field": "Number_of_SUM"}, in Cedar's supplant function. Digging further, that seems to be due to the fact that the for loop in getTokenValue() has been replaced w/ a for...in and in the app consuming this addon, tokenNameParts has the _super key in addition to the numeric array indexes (0 and 1). This causes getTokenValue to return null and that token is not replaced in the template.
While I don't understand why in one environment (the consuming app) the _super key is there, and in others (the dummy app or JSFiddle) it is not, I do think that Cedar should not use a for...in to loop through an array and hopefully that fixes this bug.
The text was updated successfully, but these errors were encountered:
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
},
EXTEND_PROTOTYPES: false
},
Similar to #27, after updating to the next version of cedar (0.8.0 in this case), I get an error in an app consuming this addon, but not in the dummy app, nor in JS Fiddle.
After much rage inducing WTF... I've traced that error down to the specification not getting correctly compiled from the template. The vega parser is choking on this line in the spec:
https://github.com/Esri/cedar/blob/95ec2b87bebcce26d4c75bc580469e826c29aa5b/src/charts/pie.json#L16
Which should have been transformed to read
{"type": "pie", "field": "Number_of_SUM"},
in Cedar'ssupplant
function. Digging further, that seems to be due to the fact that the for loop ingetTokenValue()
has been replaced w/ afor...in
and in the app consuming this addon,tokenNameParts
has the_super
key in addition to the numeric array indexes (0 and 1). This causesgetTokenValue
to returnnull
and that token is not replaced in the template.While I don't understand why in one environment (the consuming app) the
_super
key is there, and in others (the dummy app or JSFiddle) it is not, I do think that Cedar should not use afor...in
to loop through an array and hopefully that fixes this bug.The text was updated successfully, but these errors were encountered: