1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

ESLINT: Started inital pass at addressing issues

This commit is contained in:
Dan Brown
2023-04-19 10:46:13 +01:00
parent e711290d8b
commit 0519e58fbf
18 changed files with 586 additions and 554 deletions

View File

@ -35,7 +35,9 @@ export function register(editor) {
const callout = selectedNode ? selectedNode.closest('.callout') : null;
const formats = ['info', 'success', 'warning', 'danger'];
const currentFormatIndex = formats.findIndex(format => callout && callout.classList.contains(format));
const currentFormatIndex = formats.findIndex(format => {
return callout && callout.classList.contains(format);
});
const newFormatIndex = (currentFormatIndex + 1) % formats.length;
const newFormat = formats[newFormatIndex];