Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: statementview: Fixed initializing qualifiers
......................................................................


statementview: Fixed initializing qualifiers

Bug: T87363

Change-Id: I36625b155fb5889144c0a2663e418b5feff59c5e
---
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
1 file changed, 3 insertions(+), 9 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
index bd61655..c938251 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
@@ -519,7 +519,7 @@
 
                // TODO: Allow adding qualifiers when adding a new statement.
                if( this.options.value && ( this.isInEditMode() || 
this._initialQualifiers.length ) ) {
-                       this._createQualifiersListview();
+                       this._createQualifiersListview( 
this.options.value.getClaim().getQualifiers() );
                }
 
                this._createReferences( this.options.value );
@@ -686,7 +686,7 @@
                        PARENT.prototype.startEditing.call( self ).done( 
function() {
                                self._rankSelector.startEditing();
 
-                               if( this._qualifiers ) {
+                               if( self._qualifiers ) {
                                        var snaklistviews = 
self._qualifiers.value();
                                        if( snaklistviews.length ) {
                                                for( var i = 0; i < 
snaklistviews.length; i++ ) {
@@ -835,13 +835,7 @@
                        }
                }
 
-               try {
-                       this._instantiateStatement( null );
-               } catch( e ) {
-                       return false;
-               }
-
-               return true;
+               return this._instantiateStatement( null ) instanceof 
wb.datamodel.Statement;
        },
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36625b155fb5889144c0a2663e418b5feff59c5e
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>

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

Reply via email to