From 1be9020589edaa7fb31c631cfee598ecd70cc230 Mon Sep 17 00:00:00 2001 From: filipot Date: Tue, 18 Aug 2020 23:58:37 +0200 Subject: [PATCH] linting --- .../compile/render_dom/wrappers/Element/EventHandler.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts index b7a6449255..fe02087eb7 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts @@ -48,14 +48,16 @@ export default class EventHandlerWrapper { const opts = ['nonpassive', 'passive', 'once', 'capture'].filter(mod => this.node.modifiers.has(mod)); if (opts.length) { let opts_as_string; - if(opts[0] === 'nonpassive'){ + + if (opts[0] === 'nonpassive') { opts.shift(); - if(!opts.includes('passive')){ + + if (!opts.includes('passive')) { opts.push('passive'); } opts_as_string = opts.map(opt => p`${opt}: ${opt === 'passive' ? false : true}`); } - else{ + else { opts_as_string = opts.map(opt => p`${opt}: true`); } args.push((opts.length === 1 && opts[0] === 'capture') ? TRUE : x`{ ${opts_as_string} }`);