stefanfoulis/django-widgetry — pull request #11 by evildmp (2013-01-10 16:51:18+00:00)
Title: fix type error

When selecting an object type from the ````, there would be an error at line 125 of jquery.fkautocomplete.js:

TypeError: 'undefined' is not an object (evaluating
'config.add_urls[config.content_type_id].add_url')

This is because an unset ```` will give us an undefined ``config.content_type_id``.

Solution: add ``if (config.content_type_id) {`` at line 125, so we don't bother (and we don't need) to do anything in that block until an object type has been selected.