X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e711290d8b1ce06b38e0560248806e8de2077870..refs/pull/4467/head:/resources/js/wysiwyg/shortcuts.js diff --git a/resources/js/wysiwyg/shortcuts.js b/resources/js/wysiwyg/shortcuts.js index b624b23a2..1c20df9c5 100644 --- a/resources/js/wysiwyg/shortcuts.js +++ b/resources/js/wysiwyg/shortcuts.js @@ -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];