Mglaser has uploaded a new change for review.

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

Change subject: Checklist: Fallback list options when list template is corrupt
......................................................................

Checklist: Fallback list options when list template is corrupt

When the list template indicated in checklist tag does not point to
an actual wiki page, display a "-" as the only list option. This resolves
an issue where the BlueSpice Visual Editor would not load when the list
template could not be resolved.

Change-Id: I521c791b994a57d2a9c5c7a70053304b481aaeae
---
M Checklist/resources/bluespice.checklist.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/47/285147/1

diff --git a/Checklist/resources/bluespice.checklist.js 
b/Checklist/resources/bluespice.checklist.js
index 9462f21..c081d24 100644
--- a/Checklist/resources/bluespice.checklist.js
+++ b/Checklist/resources/bluespice.checklist.js
@@ -65,7 +65,11 @@
                        }] ),
                        async: false, //TODO: Reimplement with aysnc call
                        success: function(response){
-                               BsChecklist.optionsLists[listId] = 
response.results[0].listOptions;
+                               if (response.results.length > 0 ) {
+                                       BsChecklist.optionsLists[listId] = 
response.results[0].listOptions;
+                               } else {
+                                       BsChecklist.optionsLists[listId] = 
["-"];
+                               }
                        }
                });
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I521c791b994a57d2a9c5c7a70053304b481aaeae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>

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

Reply via email to