Skip to content

Commit

Permalink
Merge pull request #1088 from swagger-api/feature/array.find
Browse files Browse the repository at this point in the history
Replace [].find with lodash/find for ie11
  • Loading branch information
shockey authored Jun 19, 2017
2 parents 71f5290 + 5703819 commit 420ca04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/specmap/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import find from 'lodash/find'

import lib from './lib'
import refs from './lib/refs'
import allOf from './lib/all-of'
Expand Down Expand Up @@ -112,7 +114,8 @@ class SpecMap {
}

nextPlugin() {
return this.wrappedPlugins.find((plugin) => {
// Array.prototype.find doesn't work in IE 11 :(
return find(this.wrappedPlugins, (plugin) => {
const mutations = this.getMutationsForPlugin(plugin)
return mutations.length > 0
})
Expand Down

0 comments on commit 420ca04

Please sign in to comment.