jenkins-bot has submitted this change and it was merged.

Change subject: mw.LinkCache: Links aren't missing if they're known
......................................................................


mw.LinkCache: Links aren't missing if they're known

Thanks to new sparkly API data.

Bug: T72123
Change-Id: I9d4ff14bb2e81404224819c9153a7b8d86ca6f11
---
M modules/ve-mw/init/ve.init.mw.LinkCache.js
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/init/ve.init.mw.LinkCache.js 
b/modules/ve-mw/init/ve.init.mw.LinkCache.js
index f2d01af..cf2c67b 100644
--- a/modules/ve-mw/init/ve.init.mw.LinkCache.js
+++ b/modules/ve-mw/init/ve.init.mw.LinkCache.js
@@ -51,6 +51,7 @@
 ve.init.mw.LinkCache.static.processPage = function ( page ) {
        return {
                missing: page.missing !== undefined,
+               known: page.known !== undefined,
                redirect: page.redirect !== undefined,
                disambiguation: ve.getProp( page, 'pageprops', 'disambiguation' 
) !== undefined,
                imageUrl: ve.getProp( page, 'thumbnail', 'source' ),
@@ -78,7 +79,7 @@
        }
 
        promise.done( function ( data ) {
-               if ( data.missing ) {
+               if ( data.missing && !data.known ) {
                        $element.addClass( 'new' );
                } else {
                        // Provided by core MediaWiki, no styles by default.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d4ff14bb2e81404224819c9153a7b8d86ca6f11
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Alex Monk <a...@wikimedia.org>
Gerrit-Reviewer: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to