We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1583cd6 + c91581b commit 3cb7e1cCopy full SHA for 3cb7e1c
1 file changed
src/rule.js
@@ -206,7 +206,9 @@ class Rule extends EventEmitter {
206
}
207
let orderedSets = this.prioritizeConditions(conditions)
208
let cursor = Promise.resolve()
209
- orderedSets.forEach((set) => {
+ // use for() loop over Array.forEach to support IE8 without polyfill
210
+ for (let i = 0; i < orderedSets.length; i++) {
211
+ let set = orderedSets[i]
212
let stop = false
213
cursor = cursor.then((setResult) => {
214
// after the first set succeeds, don't fire off the remaining promises
@@ -225,7 +227,7 @@ class Rule extends EventEmitter {
225
227
// all conditions passed; proceed with running next set in parallel
226
228
return evaluateConditions(set, method)
229
})
- })
230
+ }
231
return cursor
232
233
0 commit comments