From ec7bf904846d3f7e52065305a7c18ef6d9ad2f53 Mon Sep 17 00:00:00 2001 From: Dave Gudge Date: Tue, 27 Aug 2024 13:40:35 +0100 Subject: [PATCH] fix: Ensure import is used rater than require. --- app/assets/javascripts/recurring_select.js | 3 +-- app/assets/javascripts/recurring_select_dialog.js.erb | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/recurring_select.js b/app/assets/javascripts/recurring_select.js index c93e6bd..29852ba 100644 --- a/app/assets/javascripts/recurring_select.js +++ b/app/assets/javascripts/recurring_select.js @@ -1,5 +1,4 @@ -//= require recurring_select_dialog -//= require_self +import './recurring_select_dialog.js.erb'; document.addEventListener("DOMContentLoaded", () => { document.addEventListener("focusin", (e) => { diff --git a/app/assets/javascripts/recurring_select_dialog.js.erb b/app/assets/javascripts/recurring_select_dialog.js.erb index bd60f62..4ca0657 100644 --- a/app/assets/javascripts/recurring_select_dialog.js.erb +++ b/app/assets/javascripts/recurring_select_dialog.js.erb @@ -1,5 +1,5 @@ -//= require utils -//= require defaults +import utils from './utils'; +import defaults from './defaults'; class RecurringSelectDialog { constructor(recurring_selector) { @@ -442,6 +442,6 @@ class RecurringSelectDialog { } } -RecurringSelectDialog.config = defaultConfig +RecurringSelectDialog.config = defaults.defaultConfig window.RecurringSelectDialog = RecurringSelectDialog