The "in" operator returns true even when attr.strokeDash is `null`. Since `attr.strokeDash` is null, `join` would throw. I think you can safely remove the "join" call. In L1032 (`element.setAttribute('stroke-dasharray', strokeDashArray);`) the array should get casted to a string anyway.