From f5a8587b4cded2577f81692ae84302d5b2041c19 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Fri, 19 Mar 2021 01:16:43 -0700 Subject: [PATCH] Avoid using ES6 syntax to prevent Heroku asset compilation from failing --- app/assets/javascripts/osem.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/osem.js b/app/assets/javascripts/osem.js index 636ed959..30993bd7 100644 --- a/app/assets/javascripts/osem.js +++ b/app/assets/javascripts/osem.js @@ -148,7 +148,7 @@ function word_count(text, divId, maxcount) { }; function fill_if_empty(text_area, filler) { - let area = $('#' + text_area); + var area = $('#' + text_area); if (!area.val()) { area.val(filler); @@ -192,11 +192,11 @@ $( document ).ready(function() { /* Listen for reset template button, wait for confirm, and reset. */ $('#sub_text_reset').click((e) => { - let $selected = $("#event_event_type_id option:selected"); - let $this = $(e.target); - let affirm = confirm($this.data('confirm')); + var $selected = $("#event_event_type_id option:selected"); + var $this = $(e.target); + var affirm = confirm($this.data('confirm')); if (affirm) { - let sub_text = $('#event_submission_text'); + var sub_text = $('#event_submission_text'); sub_text.val($selected.data('help')); sub_text.trigger('change'); }