PaulUithol/Backbone-relational — pull request #384 by Naddiseo (2013-07-19 21:34:00+00:00)
Title: Check for undefined "rel" in setup() constructor

In setup, around line ~1530, there's a loop over this.prototype.relations. Currently this only checks if rel.model is defined, but should also check if rel is defined.

Case in point: I've just spent the past 4 hours hunting down a bug in IE8, turns out that I had a trailing comma when defining my relations in a model. In IE >=8 this inserts an undefined value at the end of the list, which underscore then passes into that function.