Skip to content

Commit ea4304f

Browse files
committed
don't repeatedly try to load failed extensions; failed extensions don't stop the page loading
1 parent a690d3c commit ea4304f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

editor/static/js/question/edit.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,7 +1812,7 @@ $(document).ready(function() {
18121812
ko.computed(function() {
18131813
try {
18141814
if(this.used_or_required()) {
1815-
if(!this.loaded()) {
1815+
if(!this.loaded() && !ext.failed) {
18161816
try {
18171817
ext.load();
18181818
} catch(e) {
@@ -1862,12 +1862,14 @@ $(document).ready(function() {
18621862
Promise.all(script_promises).then(function() {
18631863
Numbas.activateExtension(ext.location);
18641864
ext.loaded(true);
1865-
ext.resolve_loadPromise();
18661865
viewModel.regenerateVariables();
18671866
}).catch(function(err) {
1867+
ext.failed = true;
18681868
console.error(err);
1869+
ext.error(err);
18691870
}).finally(function() {
18701871
ext.loading(false);
1872+
ext.resolve_loadPromise();
18711873
});
18721874
}
18731875
}

0 commit comments

Comments
 (0)