-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
For example, for the cz-clock-dash the code does;
Polymer({
is: 'cz-clock-dash',
properties: {
timezones: {
type: 'Object',
notify: true,
value: function() { return []; }
}
},However, if you leave the "timezone" out of the config.json you end up with the following error on the console;
cz-clock-dash.html:87 Uncaught TypeError: Cannot read property 'forEach' of undefinedPolymer.mutateTimeString @ cz-clock-dash.html:87
Polymer.attached @ cz-clock-dash.html:78
Polymer.Base._addFeature._invokeBehavior @ polymer-micro.html:414
Polymer.Base._addFeature._doBehavior @ polymer-micro.html:409
(anonymous function) @ polymer-micro.html:212
Polymer.RenderStatus.whenReady @ polymer-micro.html:107
Polymer.Base.attachedCallback @ polymer-micro.html:210
Polymer.Base._addFeature.attachedCallback @ polymer-mini.html:105
(anonymous function) @ (index):73l.onload @ polymer.html:1333
Which comes from
mutateTimeString: function() {
this.timezones.forEach((timezone, idx) => this.set('timezones.' + idx + '.data', this.currentTimeDay(timezone)));
this.async(() => this.mutateTimeString(), 1000);
},I don't understand polymer to know what is going wrong here. I would have thought that the value method should mean it ends up with a default of an empty list and https://www.polymer-project.org/1.0/docs/devguide/properties kinds of indicates that should be the case?
@shans @dstockwell - Help?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels