Jonas Kress (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384467 )

Change subject: Allow API response for Lemmas to be optional
......................................................................

Allow API response for Lemmas to be optional

There is no Lemma in the API response for now.
This will corrupt the state of the widget with the symptom second
save fails on Lemmas. In the future we might want to update the state of
the widget via API.

Change-Id: I442ab684944aa5164e509b94606146ad44859941
---
M resources/widgets/LexemeHeader.newLexemeHeaderStore.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme 
refs/changes/67/384467/1

diff --git a/resources/widgets/LexemeHeader.newLexemeHeaderStore.js 
b/resources/widgets/LexemeHeader.newLexemeHeaderStore.js
index d43eca5..abec000 100644
--- a/resources/widgets/LexemeHeader.newLexemeHeaderStore.js
+++ b/resources/widgets/LexemeHeader.newLexemeHeaderStore.js
@@ -78,8 +78,8 @@
                                                clear
                                        ).then( function ( response ) {
                                                context.commit( 
'updateRevisionId', response.entity.lastrevid );
-                                               //TODO:  update lemmas, 
language and lexicalCategory once response contains the data
-                                               context.commit( 'updateLemmas', 
response.entity.lemmas );
+                                               //TODO:  update state of 
lemmas, language and lexicalCategory if needed
+                                               context.commit( 'updateLemmas', 
response.entity.lemmas || lexeme.lemmas );
                                                context.commit( 'finishSaving' 
);
                                        } ).catch( function () {
                                                context.commit( 'finishSaving' 
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I442ab684944aa5164e509b94606146ad44859941
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de>

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

Reply via email to