From f184df64476f3e4ffd653253ff940821944d0def Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sun, 29 Mar 2020 01:03:34 -0500 Subject: [PATCH] avoid updating select options when text didn't change --- js/pacosako_ui.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/pacosako_ui.js b/js/pacosako_ui.js index 6e48509..ee20f89 100644 --- a/js/pacosako_ui.js +++ b/js/pacosako_ui.js @@ -788,7 +788,11 @@ $(function (){ opt.remove(); return; } - opt.text(opt.data('title') + age_str); + + const newText = opt.data('title') + age_str; + if (opt.text() !== newText) { + opt.text(newText); + } } window.setTimeout(function(){