[FIX] web_editor : fix some linting errors
task-2604627 X-original-commit: df980347f8c8953c2c938343b1558d1a395c716c Part-of: odoo/odoo#89210
This commit is contained in:
@@ -171,7 +171,7 @@ function getImageUrl (file) {
|
||||
return reject(reader.error);
|
||||
}
|
||||
resolve(e.target.result);
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
export class OdooEditor extends EventTarget {
|
||||
@@ -2133,7 +2133,7 @@ export class OdooEditor extends EventTarget {
|
||||
|
||||
for (const tableElement of container.querySelectorAll('table')) {
|
||||
tableElement.classList.add('table', 'table-bordered');
|
||||
};
|
||||
}
|
||||
|
||||
for (const child of [...container.childNodes]) {
|
||||
this._cleanForPaste(child);
|
||||
@@ -3008,7 +3008,7 @@ export class OdooEditor extends EventTarget {
|
||||
callback();
|
||||
|
||||
this.historyStep(true);
|
||||
}
|
||||
};
|
||||
|
||||
if (['jpg', 'jpeg', 'png', 'gif'].includes(urlFileExtention)) {
|
||||
const stepIndexBeforeInsert = this._historySteps.length - 1;
|
||||
|
||||
@@ -1439,7 +1439,7 @@ export function splitAroundUntil(elements, limitAncestor) {
|
||||
}
|
||||
|
||||
export function insertText(sel, content) {
|
||||
if (sel.anchorNode.nodeType == Node.TEXT_NODE) {
|
||||
if (sel.anchorNode.nodeType === Node.TEXT_NODE) {
|
||||
const pos = [sel.anchorNode.parentElement, splitTextNode(sel.anchorNode, sel.anchorOffset)];
|
||||
setSelection(...pos, ...pos, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user