Permalink
Browse files

Javascript bug for empty env.domains variable

  • Loading branch information...
1 parent 5ba6bbe commit a12b9257d2296827f48c263ac06bc6cb9fd0dbd3 @winton committed Oct 27, 2010
Showing with 6 additions and 5 deletions.
  1. +6 −5 public/js/dashboard.js
View
11 public/js/dashboard.js
@@ -495,11 +495,12 @@ window.Dashboard = function(sites) {
site: site
});
- $.each(env.domains.split(','), function(i, item) {
- $('.submit', dialog).before(
- $('#envs_form_domain_template').tmpl({ domain: item })
- );
- });
+ if (env.domains)
+ $.each(env.domains.split(','), function(i, item) {
+ $('.submit', dialog).before(
+ $('#envs_form_domain_template').tmpl({ domain: item })
+ );
+ });
$('.submit', dialog).before(
$('#envs_form_domain_template').tmpl()

0 comments on commit a12b925

Please sign in to comment.