Skip to content

Commit

Permalink
Removed Underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.gomez committed Jul 25, 2016
1 parent d52d993 commit c6f9e44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/components/fieldComponents/FieldGroup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Component, PropTypes } from 'react';
import FormGroup from '../FormGroup';
import _ from 'underscore';

class FieldGroup extends Component {
static propTypes = {
Expand All @@ -17,7 +16,7 @@ class FieldGroup extends Component {

getGroupContent = () => {
let { componentFactory, _extra: { layout, fields }, group: groupName } = this.props;
let group = _.find(layout.groups, g => g.name == groupName);
let group = layout.groups.find(g => g.name == groupName);
let groupProps = {
component: group.component,
layout: group,
Expand Down
3 changes: 1 addition & 2 deletions src/components/groupComponents/Group.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Component, PropTypes } from 'react';
import { Alert } from 'react-bootstrap';
import _ from 'underscore';

class Group extends Component {
static propTypes = {
Expand All @@ -17,7 +16,7 @@ class Group extends Component {
if (layout.fields) {

components = layout.fields.map(field => {
let fieldMetadata = _.find(fields, cp => cp.name === field.name);
let fieldMetadata = fields.find(cp => cp.name === field.name);

if (!fieldMetadata) {
throw Error(`Could not find field. Field: ${field.name}`);
Expand Down

0 comments on commit c6f9e44

Please sign in to comment.