jenkins-bot has submitted this change and it was merged.
Change subject: Safely ignore requests to open unrecognized windows
......................................................................
Safely ignore requests to open unrecognized windows
Change-Id: I892f7ff43a7fd7c78be071986ccf3a7119dd1ace
---
M modules/ve/ui/actions/ve.ui.WindowAction.js
1 file changed, 7 insertions(+), 5 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/ui/actions/ve.ui.WindowAction.js
b/modules/ve/ui/actions/ve.ui.WindowAction.js
index 52ba352..82d09d9 100644
--- a/modules/ve/ui/actions/ve.ui.WindowAction.js
+++ b/modules/ve/ui/actions/ve.ui.WindowAction.js
@@ -53,12 +53,14 @@
data = ve.extendObject( { 'dir': dir }, data, { 'fragment': fragment }
);
- if ( windowClass.prototype instanceof ve.ui.FragmentInspector ) {
- windowManager = this.surface.getContext().getInspectors();
- } else if ( windowClass.prototype instanceof OO.ui.Dialog ) {
- windowManager = this.surface.getDialogs();
+ if ( windowClass ) {
+ if ( windowClass.prototype instanceof ve.ui.FragmentInspector )
{
+ windowManager =
this.surface.getContext().getInspectors();
+ } else if ( windowClass.prototype instanceof OO.ui.Dialog ) {
+ windowManager = this.surface.getDialogs();
+ }
+ windowManager.openWindow( name, data );
}
- windowManager.openWindow( name, data );
};
/* Registration */
--
To view, visit https://gerrit.wikimedia.org/r/146907
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I892f7ff43a7fd7c78be071986ccf3a7119dd1ace
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits