mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
ui: simply solve a eslint bug
This commit is contained in:
1 parent
f4dbce5a76
commit
67f8c8d389
2 files changed
+6
-2
No files matched your search
@@ -25,6 +25,8 @@ function buildSequence(pages, type) {
|
|||||||
throw new Error("'type' should be one of 'before' or 'after'");
|
throw new Error("'type' should be one of 'before' or 'after'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// eslint bug
|
||||||
|
// eslint-disable-next-line react/jsx-indent
|
||||||
return pages
|
return pages
|
||||||
.filter((p) => p && p[`${type}Loading`])
|
.filter((p) => p && p[`${type}Loading`])
|
||||||
.map((p) => ({
|
.map((p) => ({
|
||||||
|
|||||||
@@ -172,9 +172,11 @@ export default new NamedPage(['problem_create', 'problem_edit'], (pagename) => {
|
|||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
$('img').each(function () {
|
$('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 $main = $('textarea[data-editor]');
|
||||||
const $field = $('textarea[data-markdown-upload]');
|
const $field = $('textarea[data-markdown-upload]');
|
||||||
|
|||||||
Reference in new issue
Block a user