Skip to content

Commit

Permalink
Hotfix to request functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
clj13001 committed Dec 1, 2016
1 parent 9b2fc6d commit 8b3f4f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion html/javascript/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function getCartItems(){
function getUnavailableItems(){
var unavailable = new Array;
var unavailable_str = localStorage.getItem('unavailable');
if(unavailable_str !== null){
if(unavailable_str !== ""){
unavailable = JSON.parse(unavailable_str);
}
return unavailable;
Expand Down
2 changes: 1 addition & 1 deletion html/javascript/shoppingCart.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ This function gets unavailable items from local storage.
function getUnavailableItems(){
var unavailable = new Array; //make new array
var unavailable_str = localStorage.getItem('unavailable'); //get the string from local storage
if(unavailable_str !== null){ //as long as its not null
if(unavailable_str !== ''){ //as long as its not null
unavailable = JSON.parse(unavailable_str); //make into array
}
return unavailable; //return value is an array
Expand Down

0 comments on commit 8b3f4f2

Please sign in to comment.