Skip to content

Commit 420ca04

Browse files
authored
Merge pull request #1088 from swagger-api/feature/array.find
Replace [].find with lodash/find for ie11
2 parents 71f5290 + 5703819 commit 420ca04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/specmap/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import find from 'lodash/find'
2+
13
import lib from './lib'
24
import refs from './lib/refs'
35
import allOf from './lib/all-of'
@@ -112,7 +114,8 @@ class SpecMap {
112114
}
113115

114116
nextPlugin() {
115-
return this.wrappedPlugins.find((plugin) => {
117+
// Array.prototype.find doesn't work in IE 11 :(
118+
return find(this.wrappedPlugins, (plugin) => {
116119
const mutations = this.getMutationsForPlugin(plugin)
117120
return mutations.length > 0
118121
})

0 commit comments

Comments
 (0)