From 180b25d3002d8b5fdd231c5e1cbc3008bc0bb96c Mon Sep 17 00:00:00 2001 From: Florian Heft Date: Wed, 15 Sep 2021 20:04:40 +0200 Subject: [PATCH] Use functions as event listeners * snabbdom v2.0.0 removed support for loaded/carrying event listeners (i.e. passing listener and parameters as array), so we replace those with 'classic' arrow functions. --- js/editor/preview.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/editor/preview.js b/js/editor/preview.js index 3aae86b..aadb8c0 100644 --- a/js/editor/preview.js +++ b/js/editor/preview.js @@ -36,12 +36,12 @@ function previewItem([tw, th], tale, slide, index, active) { dragging: previewMove.isDragging(), }, on: { - dragstart: [previewMove.dragStart, index], - dragenter: [previewMove.dragEnter, index], - dragover: [previewMove.dragOver, index, th], - dragleave: [previewMove.dragLeave, index], - drop: [previewMove.drop, index, th], - dragend: [previewMove.dragEnd], + dragstart: ev => previewMove.dragStart(index, ev), + dragenter: ev => previewMove.dragEnter(index, ev), + dragover: ev => previewMove.dragOver(index, th, ev), + dragleave: ev => previewMove.dragLeave(index, ev), + drop: ev => previewMove.drop(index, th, ev), + dragend: ev => previewMove.dragEnd(ev), }, }, [