From 4b2f3eb2392451dde135e7f8f2c18df7aff7f968 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sat, 6 Feb 2021 12:45:44 -0500 Subject: Fixes for older Safari. Tested on High Sierra, which doesn't support static field initialization, so move it into the constructor. --- rules.mjs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/rules.mjs b/rules.mjs index 3658393..76dc210 100644 --- a/rules.mjs +++ b/rules.mjs @@ -7,11 +7,10 @@ import NucleotideSelector from './nucleotide-selector.mjs' import Error from './error.mjs' class CloneNucleotide { - id = 'clone-nucleotide' - constructor(rules) { this.rules = rules + this.id = 'clone-nucleotide' this._boundClickHandler = this.clickHandler.bind(this) } @@ -35,10 +34,10 @@ class CloneNucleotide { } class RollForNucleotide { - id = 'roll-for-nucleotide' - constructor(rules) { this.rules = rules + + this.id = 'roll-for-nucleotide' } enter() { @@ -67,10 +66,10 @@ class RollForNucleotide { } class NucleotideSelect { - id = 'nucleotide-select' - constructor(rules) { this.rules = rules + + this.id = 'nucleotide-select' } enter() { @@ -101,10 +100,10 @@ class NucleotideSelect { } class RollForMutation { - id = 'roll-for-mutation' - constructor(rules) { this.rules = rules + + this.id = 'roll-for-mutation' } enter() { @@ -124,10 +123,10 @@ class RollForMutation { } class PerformMutation { - id = 'perform-mutation' - constructor(rules) { this.rules = rules + + this.id = 'perform-mutation' } enter() { @@ -196,11 +195,10 @@ class PerformMutation { } class DoNothing { - id = 'print-results' - constructor(rules) { this.rules = rules + this.id = 'print-results' this._boundClickHandler = this.clickHandler.bind(this) } -- cgit v1.2.3