Fix race condition in service manifest fetching (#2872)

* Fix race condition in service manifest fetching. Fixes #2803

* Set own recon endpoint for Wikidata extension
This commit is contained in:
Antonin Delpeuch 2020-08-21 07:15:02 +02:00 committed by GitHub
parent 92ad819e34
commit 68404abe2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,9 +128,6 @@ SchemaAlignmentDialog.setUpTabs = function() {
// Init the column area // Init the column area
this.updateColumns(); this.updateColumns();
var url = ReconciliationManager.ensureDefaultServicePresent();
SchemaAlignmentDialog._reconService = ReconciliationManager.getServiceFromUrl(url);
/** /**
* Init the issues tab * Init the issues tab
*/ */
@ -148,10 +145,17 @@ SchemaAlignmentDialog.setUpTabs = function() {
this._previewPanes = $(".schema-alignment-dialog-preview"); this._previewPanes = $(".schema-alignment-dialog-preview");
var lang = $.i18n('core-recon/wd-recon-lang');
var url = "https://wdreconcile.toolforge.org/"+lang+"/api";
ReconciliationManager.getOrRegisterServiceFromUrl(url, function(service) {
// Load the existing schema // Load the existing schema
this._reset(theProject.overlayModels.wikibaseSchema); SchemaAlignmentDialog._reconService = service;
SchemaAlignmentDialog._reset(theProject.overlayModels.wikibaseSchema);
// Perform initial preview // Perform initial preview
this.preview(); SchemaAlignmentDialog.preview();
}, false);
} }
SchemaAlignmentDialog.updateColumns = function() { SchemaAlignmentDialog.updateColumns = function() {