{"action":"opened","issue":{"url":"https://api.github.com/repos/Polymer/polymer/issues/4279","repository_url":"https://api.github.com/repos/Polymer/polymer","labels_url":"https://api.github.com/repos/Polymer/polymer/issues/4279/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer/issues/4279/comments","events_url":"https://api.github.com/repos/Polymer/polymer/issues/4279/events","html_url":"https://github.com/Polymer/polymer/issues/4279","id":203902113,"number":4279,"title":"Array object has null keys and so crashes with TypeError when rendering (dom-repeat?)","user":{"login":"akc42","id":368238,"avatar_url":"https://avatars.githubusercontent.com/u/368238?v=3","gravatar_id":"","url":"https://api.github.com/users/akc42","html_url":"https://github.com/akc42","followers_url":"https://api.github.com/users/akc42/followers","following_url":"https://api.github.com/users/akc42/following{/other_user}","gists_url":"https://api.github.com/users/akc42/gists{/gist_id}","starred_url":"https://api.github.com/users/akc42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akc42/subscriptions","organizations_url":"https://api.github.com/users/akc42/orgs","repos_url":"https://api.github.com/users/akc42/repos","events_url":"https://api.github.com/users/akc42/events{/privacy}","received_events_url":"https://api.github.com/users/akc42/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-29T22:37:20Z","updated_at":"2017-01-29T22:37:20Z","closed_at":null,"body":"I have a complex variable which is the source for a complex nested set of dom-repeat templates and at the inner level a pair of dom-if templates.\r\n\r\nThe structure of the variable is\r\n\r\nclinicians - array of -> clinician object\r\neach clinician object has a subproperty appointments\r\n\r\nappointments - array of -> appointment objects\r\nappointments are of two types based on the sub-property slot \r\n if slot is true then this is a minimal object with just a start and end time\r\n if slot is false then this is a larger object with full details of the appointment.\r\n\r\nThe crash \r\n```\r\npolymer-mini.html:2042 Uncaught TypeError: Cannot read property 'length' of undefined(…)  polymer-mini.html:2042\r\n    _applySplicesArrayOrder @ polymer.html:4991\r\n    _render @ polymer.html:4842\r\n    complete @ polymer-mini.html:2081\r\n    Debouncer.boundComplete @ polymer-mini.html:2058\r\n    _atEndOfMicrotask @ polymer-mini.html:2036\r\n    window.MutationObserver.observe.characterData @ polymer-mini.html:2051\r\n    \r\n```\r\nI tracked by single stepping through that _applySpicesArrayOrder and the line referenced 4991\r\n```\r\nfor (j = 0; j < s.addedKeys.length; j++) {\r\n```\r\nthat addedKeys was null.\r\n\r\nThe large variable (`clinicians`) that I referred to above is manipulated generally by using `this.set` and `this.push` calls.  I have another larger multilayed structure from which clinicians is copied\r\n(its an array of weeks in a month (from first monday before start of month to first sunday after the end of the month, and within that an array of 7 days, where each day is an object which contains the `clinicians` array) also manipulated with set and push this seems to work fully. This is generally building the initial array from full appointments.\r\n\r\nBut I also manipulate the appointments array of a given clinician by using `this.splice` calls to add or remove the type of appointments that are the `slots`.  I single stepped through one of these splice calls and I can see it asking the polymer collection for a keys and getting a null answer back.  This seems to be stored with the splice record and is the cause of the null `addedKeys` that causes the crash.\r\n\r\nUnfortunately all the code is far too large to post here, or in a jsbin. It is also private, so I don't have a public repository that I can share.\r\n\r\nThese results are with Chrome\r\n### Versions\r\n<!--\r\n`Polymer.version` will show the version for Polymer\r\n`bower ls` or `npm ls` will show the version of webcomponents.js or webcomponents-lite.js\r\n-->\r\n- Polymer: v1.7.1\r\n- webcomponents: v0.7.23\r\n"}}
{"actor":{"display_login":"akc42"}}