From 54ec4fa28a7170f1e92693858a995e90797b0183 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Sat, 22 Sep 2018 09:23:59 +0300 Subject: [PATCH] attr() is undefined when elem doesnt have it --- code/html/custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/html/custom.js b/code/html/custom.js index de0c5af7..2b37998c 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -359,7 +359,7 @@ function sendConfig(data) { function setOriginalsFromValues(force) { var force = (true === force); $("input,select").each(function() { - var initial = (null === $(this).attr("original")); + var initial = (undefined === $(this).attr("original")); if (force || initial) { $(this).attr("original", $(this).val()); }