Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/140044

Change subject: Media search dialog: Only try to abort request if possible.
......................................................................

Media search dialog: Only try to abort request if possible.

Sometimes we have to load images in a way that we can't abort.
In that case, don't bother trying to abort, it just creates annoying console
messages.

Bug: 59604
Change-Id: Idb675f57284d9ffa1fe69c87806009a31711dabe
---
M modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/44/140044/1

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
index 93d0895..a047c55 100755
--- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
@@ -129,7 +129,7 @@
                // If we don't have either 'apiurl' or 'scriptDirUrl'
                // the source is invalid, and we will skip it
                if ( source.apiurl || source.scriptDirUrl !== undefined ) {
-                       if ( source.request ) {
+                       if ( source.request && source.request.abort ) {
                                source.request.abort();
                        }
                        if ( !source.gsroffset ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/140044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb675f57284d9ffa1fe69c87806009a31711dabe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to