PDA

View Full Version : [FIXED] [6.0.0.415 beta] Ext.dom.Query.selectValue defaultValue is not used



raphael.franchet
5 Jun 2015, 8:00 AM
As you can see in this fiddle : https://fiddle.sencha.com/#fiddle/o4p


alert(Ext.dom.Query.selectValue("> raoul", document, "default value"))

should return "default value", but returns "undefined"

and if you have a look at the code, you will see that defaultValue is never read !


selectValue: function(path, root, defaultValue) { path = path.replace(trimRe, "");
var query = valueCache.get(path),
n, v;


if (!query) {
query = DQ.compile(path, "select");
valueCache.add(path, query);
} else {
setupEscapes(path);
}


n = query(root);
return DQ.getNodeValue(n[0] ? n[0] : n);
}

Gary Schlosberg
30 Jun 2015, 2:48 PM
Thanks for the report! I have opened a bug in our bug tracker.

Gary Schlosberg
1 Jul 2015, 3:45 PM
There is an override on the bug ticket. Support subscribers can open a support ticket to gain access to it before the fix makes it into a future release.