mw.htmlform: Don't refer to OO.ui if it might not be loaded
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 25 Aug 2016 04:34:35 +0000 (06:34 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 25 Aug 2016 04:34:35 +0000 (06:34 +0200)
commitb7379fcb5c54b2c0f91d33698f41ece9fce65b3f
tree2d12105d3aefdb1d73d5a1fc717befa8f22a403e
parentbc335c231d3c6ca5a63936e1f3b3798384c91cbb
mw.htmlform: Don't refer to OO.ui if it might not be loaded

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
resources/src/mediawiki/htmlform/hide-if.js