> The template is used in some other places.

Yes.

> It will break those uses.

No, because 

> It doesn't appear that any other button definition is actually using attributes

Meaning, if you search the entire codebase for 'attributes' (which is a fool-proof way of finding all possible relevant usages), you will find that there are no other usages of `generateNewModal()` which specify `attributes`.

In other words, this line in the template is dead code that relies on `_.each` coercing `undefined` to an empty array:

```javascript
 _.each(button.attributes, function (attrib, val) { %><%=attrib%>="<%=val%>"<% });
```

Looking back in the history (using `git log -p --source --all -S generateNewModal`, which you can use an [alias](http://mwhite.info/blog/2013/10/08/the-ultimate-git-alias-setup/) for), it appears that the only value for attributes that was ever used was `{disabled: 'disabled'}`, so it's easy to see how this got to be the way it is (and raises the question of whether it might have been more appropriate to just hard-code that attribute).

Dead and/or buggy code is practically unavoidable.  What matters is recognizing it when you see it and removing it or fixing it, instead of making it permanent by writing new code that depends on the buggy or previously dead code.

So, you found yourself having to do something stupid in order to get working code using existing code.  You should ask yourself whether it's more likely that everyone else has also done the same stupid thing (if so, you should just go undo their stupid things, since it would be very easy in this case, or at least maybe find their utility function and use it instead of creating a new one), or whether in fact no one else is actually using this existing code, in which case you can just change it.

By not doing that, you make your code marginally longer and harder to understand, but you also make it so that everyone who comes after you has to do stupid stuff.  If you constantly do this, it results in an unmaintainable mess.

So please, try to engage in that sort of thinking.  I'm sure if you become just slightly averse to doing stupid things, it won't be hard. It makes everything easier in the long run.  Grep is your friend.