ui: simply solve a eslint bug

pull/311/head
undefined 3 years ago
parent f4dbce5a76
commit 67f8c8d389

@ -25,6 +25,8 @@ function buildSequence(pages, type) {
throw new Error("'type' should be one of 'before' or 'after'");
}
}
// eslint bug
// eslint-disable-next-line react/jsx-indent
return pages
.filter((p) => p && p[`${type}Loading`])
.map((p) => ({

@ -172,9 +172,11 @@ export default new NamedPage(['problem_create', 'problem_edit'], (pagename) => {
setInterval(() => {
$('img').each(function () {
if (this.src.startsWith('file://')) this.setAttribute('src', this.src.replace('file://', './file/'));
if (this.src.startsWith('file://')) {
this.setAttribute('src', this.src.replace('file://', './file/').replace(/\/$/, ''));
}
});
}, 200);
}, 500);
const $main = $('textarea[data-editor]');
const $field = $('textarea[data-markdown-upload]');

Loading…
Cancel
Save