Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix javascript variable initialisation

Roland Geiderc67913629cec
diff --git a/wger/nutrition/static/js/nutrition.js b/wger/nutrition/static/js/nutrition.js
index 868c4087d..a2b9bf522 100644
--- a/wger/nutrition/static/js/nutrition.js
+++ b/wger/nutrition/static/js/nutrition.js
@@ -73,7 +73,7 @@ function init_english_ingredients()
e.preventDefault();
// Update the status icon and the data attribute
- switch_to = $('#english-ingredients-status').data('showIngredients') == 'true' ? 0 : 1;
+ var switch_to = $('#english-ingredients-status').data('showIngredients') == 'true' ? 0 : 1;
if ( switch_to == 1 )
{
$('#english-ingredients-status').attr("src", "/static/images/icons/status-on.svg");