瀏覽代碼

Use getItem to try an fix transient issue with name

Andrew Kane 8 年之前
父節點
當前提交
1678cb8733
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/views/blazer/dashboards/_form.html.erb

+ 2 - 2
app/views/blazer/dashboards/_form.html.erb

@@ -51,7 +51,7 @@
         maxOptions: 100,
         onChange: function(val) {
           if (val) {
-            var option = this.getOption(val)
+            var item = this.getItem(val)
 
             // if duplicate query is added, remove the first one
             for (var i = 0; i < app.queries.length; i++) {
@@ -61,7 +61,7 @@
               }
             }
 
-            app.queries.push({id: val, name: option.text()})
+            app.queries.push({id: val, name: item.text()})
             this.setValue("")
           }
         }