From f5943d8c7c258841f49af8bb888b3d2e1a34f342 Mon Sep 17 00:00:00 2001 From: Baruch Rothkoff Date: Sun, 12 Apr 2020 16:15:26 +0300 Subject: [PATCH] fix #242 --- src/directive.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/directive.js b/src/directive.js index c4b1e0d7..68204719 100644 --- a/src/directive.js +++ b/src/directive.js @@ -39,8 +39,10 @@ function getBinding(el) { } function handleClick(e) { + const ctx = getBinding(this).binding + if (!ctx.value) return + e.preventDefault() - let ctx = getBinding(this).binding if (typeof ctx.value === 'string') { return scrollTo(ctx.value)