Skip to content

Commit

Permalink
fix from review
Browse files Browse the repository at this point in the history
  • Loading branch information
luojiyin1987 committed Jul 11, 2024
1 parent fb0a29c commit fdf6d9f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions components/Git/ArticleEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,24 @@ export class ArticleEditor extends Component {
reset = () => {
this.meta = null;

if (this.editorContent) this.editorContent = '';
this.editorContent = '';
};

onPathClear = ({ target: { value } }: ChangeEvent<HTMLInputElement>) => {
if (value.trim()) return;

this.meta = null;

if (this.editorContent) this.editorContent = '';
this.editorContent = '';
};

fixURL = debounce(() => {
const { repository } = this,
pageURL = window.location.href.split('?')[0];
pageURL = window.location.href.split('?')[0],
root = document.querySelector('div[contenteditable]');

if (this.core && this.core.root)
for (let element of this.core.root.querySelectorAll<HyperLink>(
'[href], [src]',
)) {
if (root)
for (let element of root.querySelectorAll<HyperLink>('[href], [src]')) {
let URI =
element instanceof HTMLAnchorElement ? element.href : element.src;

Expand Down Expand Up @@ -185,8 +184,9 @@ export class ArticleEditor extends Component {

if (!editorContent) return;

const root = document.querySelector('div[contenteditable]');
const media: HTMLMediaElement[] = [].filter.call(
core.root.querySelectorAll('img[src], audio[src], video[src]'),
root!.querySelectorAll('img[src], audio[src], video[src]'),
({ src }) => new URL(src).protocol === 'blob:',
);

Expand Down

1 comment on commit fdf6d9f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for oss-toolbox ready!

✅ Preview
https://oss-toolbox-71kgdxw2n-techquerys-projects.vercel.app

Built with commit fdf6d9f.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.