src/js/controllers/flatpickr_controller.js in plutonium-0.16.0 vs src/js/controllers/flatpickr_controller.js in plutonium-0.16.1

- old
+ new

@@ -2,16 +2,16 @@ // Connects to data-controller="flatpickr" export default class extends Controller { connect() { console.log(`flatpickr connected: ${this.element}`) - self.picker = new flatpickr(this.element, this.#buildOptions()) + this.picker = new flatpickr(this.element, this.#buildOptions()) this.element.setAttribute("data-action", "turbo:morph-element->flatpickr#reconnect") } disconnect() { - self.picker.destroy() - self.picker = null + this.picker.destroy() + this.picker = null } reconnect() { this.disconnect() this.connect()