From e2b6f15a0c11951bf858ee3b59ede998e4eb612f Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Tue, 12 Mar 2024 13:47:49 +0000 Subject: [PATCH] ID-3827 Ensures inline links are only initialized once (#14) --- js/build.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/build.js b/js/build.js index 7cc6fb2..ea036f8 100644 --- a/js/build.js +++ b/js/build.js @@ -1,7 +1,11 @@ Fliplet.Widget.instance('inline-link', function(config) { + if ($(this).data('initialized')) { + return; + } + $(this).on('click', function(event) { event.preventDefault(); Fliplet.Navigate.to(config.action); - }); + }).data('initialized', true); });