diff --git a/embark-ui/src/components/CompilerError.js b/embark-ui/src/components/CompilerError.js index 954cc892..e0130b46 100644 --- a/embark-ui/src/components/CompilerError.js +++ b/embark-ui/src/components/CompilerError.js @@ -2,14 +2,14 @@ import React from 'react'; import PropTypes from 'prop-types'; import {Badge} from 'tabler-react'; -const CompilerError = ({key, onClick, errorType, row, errorMessage}) => ( +const CompilerError = ({ index, onClick, errorType, row, errorMessage}) => ( - + Line {row} {errorMessage} @@ -17,10 +17,10 @@ const CompilerError = ({key, onClick, errorType, row, errorMessage}) => ( ); CompilerError.propTypes = { - key: PropTypes.string, + index: PropTypes.number, onClick: PropTypes.func, errorType: PropTypes.string, - row: PropTypes.number, + row: PropTypes.string, errorMessage: PropTypes.string }; diff --git a/embark-ui/src/containers/FiddleContainer.js b/embark-ui/src/containers/FiddleContainer.js index a0c37024..d43ce130 100644 --- a/embark-ui/src/containers/FiddleContainer.js +++ b/embark-ui/src/containers/FiddleContainer.js @@ -48,7 +48,8 @@ class FiddleContainer extends Component { node: { this._onErrorClick(e, annotation); }} - key={index} + key={`${errorType}_${index}`} + index={index} errorType={errorType} row={errorRowCol.row} errorMessage={error.formattedMessage}/>,