Loki: Refactor editor and syntax hooks (#21687)

This commit is contained in:
Andrej Ocenas
2020-01-24 15:07:45 +01:00
committed by GitHub
parent b28eac2626
commit 39f7cff7c7
11 changed files with 130 additions and 101 deletions

View File

@@ -188,9 +188,9 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
remaining.map((task: Promise<any>) => task.then(this.onUpdateLanguage).catch(() => {}));
})
.then(() => this.onUpdateLanguage())
.catch(({ isCanceled }) => {
if (isCanceled) {
console.warn('PromQueryField has unmounted, language provider intialization was canceled');
.catch(err => {
if (!err.isCanceled) {
throw err;
}
});
};