From 90fa1345b0dbb332dd58c5d2d83561e90d96ed16 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 7 Feb 2015 03:02:26 -0800 Subject: [PATCH] Fix purge + refresh of define info --- Marlin/configurator/js/configurator.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Marlin/configurator/js/configurator.js b/Marlin/configurator/js/configurator.js index 5bd580025b..36d6d290c9 100644 --- a/Marlin/configurator/js/configurator.js +++ b/Marlin/configurator/js/configurator.js @@ -523,8 +523,9 @@ var configuratorApp = (function(){ */ purgeDefineInfo: function(adv) { if (adv === undefined) adv = false; - $('[defineInfo]').each(function() { - if (adv === this.defineInfo.adv) $(this).removeProp('defineInfo'); + $('[name]').each(function() { + var inf = this.defineInfo; + if (inf && adv === inf.adv) $(this).removeProp('defineInfo'); }); }, @@ -533,8 +534,9 @@ var configuratorApp = (function(){ */ refreshDefineInfo: function(adv) { if (adv === undefined) adv = false; - $('[defineInfo]').each(function() { - if (adv == this.defineInfo.adv) this.defineInfo = self.getDefineInfo(this.id, adv); + $('[name]').each(function() { + var inf = this.defineInfo; + if (inf && adv == inf.adv) this.defineInfo = self.getDefineInfo(this.id, adv); }); },