Skip to content

Commit

Permalink
make jobsReadyCallback optional
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Oct 7, 2020
1 parent c09cacc commit e11daec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kbase-extension/static/kbase/js/kbaseNarrative.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,15 +897,19 @@ define([
.initCommChannel()
.then(() => {
this.loadingWidget.updateProgress('jobs', true);
jobsReadyCallback();
if (jobsReadyCallback) {
jobsReadyCallback();
}
})
.catch((err) => {
console.error('An error occurred while initializing kbase comm channel', err);
KBFatal(
'Narrative.init',
'KBase communication channel could not be initiated with the kernel.'
);
jobsReadyCallback({error: err});
if (jobsReadyCallback) {
jobsReadyCallback({error: err});
}
});
});
};
Expand Down

0 comments on commit e11daec

Please sign in to comment.