浏览代码

Fix purge + refresh of define info

Scott Lahteine 10 年前
父节点
当前提交
90fa1345b0
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6
    4
      Marlin/configurator/js/configurator.js

+ 6
- 4
Marlin/configurator/js/configurator.js 查看文件

@@ -523,8 +523,9 @@ var configuratorApp = (function(){
523 523
      */
524 524
     purgeDefineInfo: function(adv) {
525 525
       if (adv === undefined) adv = false;
526
-      $('[defineInfo]').each(function() {
527
-        if (adv === this.defineInfo.adv) $(this).removeProp('defineInfo');
526
+      $('[name]').each(function() {
527
+        var inf = this.defineInfo;
528
+        if (inf && adv === inf.adv) $(this).removeProp('defineInfo');
528 529
       });
529 530
     },
530 531
 
@@ -533,8 +534,9 @@ var configuratorApp = (function(){
533 534
      */
534 535
     refreshDefineInfo: function(adv) {
535 536
       if (adv === undefined) adv = false;
536
-      $('[defineInfo]').each(function() {
537
-        if (adv == this.defineInfo.adv) this.defineInfo = self.getDefineInfo(this.id, adv);
537
+      $('[name]').each(function() {
538
+        var inf = this.defineInfo;
539
+        if (inf && adv == inf.adv) this.defineInfo = self.getDefineInfo(this.id, adv);
538 540
       });
539 541
     },
540 542
 

正在加载...
取消
保存