mirror of
https://github.com/codex-team/editor.js
synced 2026-03-18 00:19:53 +01:00
eslint
This commit is contained in:
parent
a039a63a1a
commit
6eb3dbcbc7
2 changed files with 6 additions and 6 deletions
|
|
@ -210,7 +210,7 @@ export default class Block extends EventsDispatcher<BlockEvents> {
|
|||
*/
|
||||
private didMutated = _.debounce((mutationsOrInputEvent: MutationRecord[] | InputEvent = undefined): void => {
|
||||
/**
|
||||
* We won't fire a Block mutation event for nodes that contain 'data-mutation-free' attributes
|
||||
* We won't fire a Block mutation event if mutation contain only nodes marked with 'data-mutation-free' attributes
|
||||
*/
|
||||
let shouldFireUpdate;
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ export default class Block extends EventsDispatcher<BlockEvents> {
|
|||
const { addedNodes, removedNodes } = record;
|
||||
const changedNodes = [
|
||||
...Array.from(addedNodes),
|
||||
...Array.from(removedNodes)
|
||||
...Array.from(removedNodes),
|
||||
];
|
||||
|
||||
return changedNodes.some((node) => {
|
||||
|
|
@ -239,8 +239,8 @@ export default class Block extends EventsDispatcher<BlockEvents> {
|
|||
}
|
||||
|
||||
return (node as HTMLElement).dataset.mutationFree === 'true';
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
if (everyRecordIsMutationFree) {
|
||||
shouldFireUpdate = false;
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ describe('Editor Tools Api', () => {
|
|||
/** config specified handled tag */
|
||||
public static get pasteConfig(): PasteConfig {
|
||||
return {
|
||||
tags: ['img'], // only tag name specified. Attributes should be sanitized
|
||||
tags: [ 'img' ], // only tag name specified. Attributes should be sanitized
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -564,7 +564,7 @@ describe('Editor Tools Api', () => {
|
|||
/** config specified handled tag */
|
||||
public static get pasteConfig(): PasteConfig {
|
||||
return {
|
||||
tags: ['img'], // only tag name specified. Attributes should be sanitized
|
||||
tags: [ 'img' ], // only tag name specified. Attributes should be sanitized
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue