From bbdeda951acd52ec85248d4c79b36911516ac398 Mon Sep 17 00:00:00 2001 From: Bryce Allen Date: Mon, 23 Nov 2015 23:19:16 -0600 Subject: [PATCH] fix recommends history bug on direct load --- web/recommends.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/recommends.html b/web/recommends.html index 62c1eda..32239e3 100644 --- a/web/recommends.html +++ b/web/recommends.html @@ -63,7 +63,8 @@ // the state to history var item_name = $.trim($("#item").val()); var normalized_name = normalize_name(item_name); - if (window.history.state["item_name"] == normalized_name) { + if (window.history.state + && window.history.state["item_name"] == normalized_name) { console.log("item not changed, skipping update"); return; }