Skip to content

Commit 32cea96

Browse files
committed
stay compatible with uglify js
ruby uglify gets confused with some modern js syntax
1 parent 153577c commit 32cea96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/assets/javascripts/recurring_select_dialog.js.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
//= require defaults
33

44
class RecurringSelectDialog {
5-
static config = defaultConfig
6-
75
constructor(recurring_selector) {
86
this.config = this.constructor.config
97
this.cancel = this.cancel.bind(this);
@@ -78,7 +76,7 @@ class RecurringSelectDialog {
7876

7977
freqInit() {
8078
this.freq_select = this.outer_holder.querySelector(".rs_frequency");
81-
const rule_type = this.current_rule.hash?.rule_type
79+
const rule_type = this.current_rule.hash && this.current_rule.hash.rule_type
8280
if (this.current_rule.hash != null && rule_type != null) {
8381
if (rule_type.search(/Weekly/) !== -1) {
8482
this.freq_select.selectedIndex = 1
@@ -444,4 +442,6 @@ class RecurringSelectDialog {
444442
}
445443
}
446444

445+
RecurringSelectDialog.config = defaultConfig
446+
447447
window.RecurringSelectDialog = RecurringSelectDialog

0 commit comments

Comments
 (0)