diff options
author | Struan Donald <struan@exo.org.uk> | 2013-06-19 13:51:45 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-06-19 13:51:45 +0100 |
commit | 559675c0a73cde0b725ba1836fa35340b769ccdc (patch) | |
tree | 98a1c69d22f1285ad06e8a84fdbcff45ab43a6d0 /www/js | |
parent | 7b3875984223b811a69fd914a17b87bc31086ba2 (diff) |
only display extra details page if we have been asked for extra details
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/views/details.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/js/views/details.js b/www/js/views/details.js index 8da8ca5..b11dac1 100644 --- a/www/js/views/details.js +++ b/www/js/views/details.js @@ -80,15 +80,15 @@ dataType: 'json', timeout: 30000, success: function( data, status ) { - if ( data ) { + if ( data && data.category_extra && data.category_extra.length > 0 ) { that.model.set('category_extras', data.category_extra); that.navigate('details_extra'); } else { - that.navigate( this.next ); + that.navigate( that.next ); } }, error: function() { - this.navigate( this.next ); + this.navigate( that.next ); } } ); } |