Closed Prinzhorn closed 10 years ago
The reason this hasn't thrown errors in the past is because non-handler binding params ("events", "optionsDefault", etc) would be caught by this error checking and throw exceptions. However, this issue has come up several times now, so let's finally do something about it. I've added validation against allowed param attributes as well... now if there's no handler and no allowed attribute with the given name, then an exception should be raised. See f86ceae.
Thanks!
Imagine using the
text
binding and having a typo in the bindings liketetx
. You may spend an unnecessary amount of time trying to debug this, because epoxy silently ignores unknown bindings.I guess there should be an
else
with athrow
at this line https://github.com/gmac/backbone.epoxy/blob/8cef8fff1825c59f96a2e1f13fc6b86f71f9a0f0/backbone.epoxy.js#L1215 , do you agree? Is this even the right part of the code? I was just searching through it real quick.I can create a pull request if you want to.