Dependencies are loaded dynamically here, before this code runs.
If there are no OOjs UI HTMLForm fields on the page, then OOjs UI
is not loaded, and the attempt to check if we're working with a
OO.ui.Widget would cause an exception. Invert the test to check
for jQuery, which is always loaded.
Follow-up to
89107070d14187915e760f8543579ec4d784620f.
Bug: T143850
Change-Id: Ibaa5a15fe367ed7470e3e8176e52b13442aeb985
}
v = spec[ 2 ];
- if ( field instanceof OO.ui.Widget ) {
+ if ( !( field instanceof jQuery ) ) {
+ // field is a OO.ui.Widget
if ( field.supports( 'isSelected' ) ) {
getVal = function () {
var selected = field.isSelected();