mw.popups.isEnabled should always return boolean

Mismatch between documentation and function signature

Bug: T346106
Change-Id: I43e0efc67b76496aab228b3f971db795662337cf
This commit is contained in:
Jon Robson 2023-10-16 10:12:07 -07:00
parent 90a829179c
commit 614039b7df
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View file

@ -20,7 +20,7 @@ export default function createMwPopups( store, registerModel, registerPreviewUI,
* @return {boolean} If Page Previews are currently active
*/
isEnabled: function isEnabled() {
return store.getState().preview.enabled[ previewTypes.TYPE_PAGE ];
return !!store.getState().preview.enabled[ previewTypes.TYPE_PAGE ];
},
/**
* @stable Do not remove properties in the type PopupModule without providing backwards