From 54b373f350234fa23f9fb43e82b347630db99bdc Mon Sep 17 00:00:00 2001 From: Jared Stehler Date: Thu, 12 Mar 2020 13:16:50 -0400 Subject: [PATCH] fix null pointer when no params on image url --- static/js/hugo-learn.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/static/js/hugo-learn.js b/static/js/hugo-learn.js index 5fad00a46fd..9fab8ded64a 100644 --- a/static/js/hugo-learn.js +++ b/static/js/hugo-learn.js @@ -10,10 +10,8 @@ var getUrlParameter = function getUrlParameter(sPageURL) { sParameterName = sURLVariables[i].split('='); obj[sParameterName[0]] = sParameterName[1]; } - return obj; - } else { - return undefined; } + return obj; }; // Execute actions on images generated from Markdown pages