From 3fdbd01b78b0e7b5bc548eb4968167b14024fcd3 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 23 Mar 2021 11:37:14 -0300 Subject: [PATCH] =?UTF-8?q?usar=20tabs=20ac=C3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/editor/editor.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/javascript/editor/editor.ts b/app/javascript/editor/editor.ts index b509be7f..3d344a8d 100644 --- a/app/javascript/editor/editor.ts +++ b/app/javascript/editor/editor.ts @@ -278,19 +278,19 @@ function setupEditor (editorEl: HTMLElement): void { } document.addEventListener("turbolinks:load", () => { - const flash = document.querySelector('.js-flash') + const flash = document.querySelector('.js-flash') - if (flash) { - const keys = JSON.parse(flash.dataset.keys || '[]') + if (flash) { + const keys = JSON.parse(flash.dataset.keys || '[]') - switch (flash.dataset.target) { - case 'editor': - switch (flash.dataset.action) { - case 'forget-content': - keys.forEach(forgetContent) - } - } - } + switch (flash.dataset.target) { + case 'editor': + switch (flash.dataset.action) { + case 'forget-content': + keys.forEach(forgetContent) + } + } + } for (const editorEl of document.querySelectorAll('.editor[data-editor]')) { try {