Fix interpretation of 'prioritized'

Docs (especially in EventPresentationModel.php) say true means outside
the menu, false inside.

However, it was interpreting any non-undefined value as true.

Change-Id: Icb438538e5c588c1ac7d4bbac0b762dd07057199
This commit is contained in:
Matthew Flaschen 2017-09-07 19:11:56 -04:00
parent 32af6dae0c
commit f80a11d53b

View file

@ -130,7 +130,7 @@
// prioritized explicitly, *except* for items inside a bundle
// (where all actions are inside the menu) or there are more than
// two prioritized actions (all others go into the menu)
isOutsideMenu = !this.bundle && urlObj.prioritized !== undefined && outsideMenuItemCounter < mw.echo.config.maxPrioritizedActions;
isOutsideMenu = !this.bundle && urlObj.prioritized && outsideMenuItemCounter < mw.echo.config.maxPrioritizedActions;
linkButton = new mw.echo.ui.MenuItemWidget( {
type: urlObj.type,