jenkins-bot has submitted this change and it was merged.
Change subject: claimgrouplabelscroll: Prevent running in error
......................................................................
claimgrouplabelscroll: Prevent running in error
Skip updating claim name position when a claim group does not have a claim name.
This occurs when a claim is in pending state.
Change-Id: I67246f6fcaf79ce99b4c5a2b7676831d1183d6bd
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Tobias Gritschacher: Looks good to me, approved
jenkins-bot: Verified
Objections:
Jeroen De Dauw: There's a problem with this change, please improve
diff --git
a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index 843755a..3dced51 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -125,6 +125,11 @@
$claimNameSection =
$claimGroup.children( '.wb-claim-section-name' ),
$claimGroupLabel =
$claimNameSection.children( '.wb-claim-name' );
+ if( !$claimNameSection.length ) {
+ // No claim name present (claim likely
is pending).
+ continue;
+ }
+
this._log(
'positioning',
$claimGroupLabel.get( 0 ),
--
To view, visit https://gerrit.wikimedia.org/r/89208
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I67246f6fcaf79ce99b4c5a2b7676831d1183d6bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits