Permalink
Browse files

Fix javascript error on product page. Availability element is optiona…

…l and must be checked for before assigning to it.
  • Loading branch information...
1 parent c977cad commit cf128c98ae6586009d3a708e9a422449c86a4d91 @dannyhenderson dannyhenderson committed Apr 6, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 public/sites/Shop/javascript/products/info.js
View
4 public/sites/Shop/javascript/products/info.js
@@ -68,6 +68,8 @@ function refreshVariants() {
}
document.getElementById('productInfoPrice').innerHTML = price;
- document.getElementById('productInfoAvailability').innerHTML = availability;
+ if(document.getElementById('productInfoAvailability') != undefined) {
+ document.getElementById('productInfoAvailability').innerHTML = availability;
+ }
document.getElementById('productInfoModel').innerHTML = model;
}

0 comments on commit cf128c9

Please sign in to comment.