fix(minimap): dont crash when there are no styles

This commit is contained in:
moklick
2019-08-05 17:24:17 +02:00
parent 1d81205d4f
commit f61f89410f

View File

@@ -12,7 +12,7 @@ const baseStyle = {
width: 200,
};
export default ({ style, className, bgColor = '#f8f8f8', nodeColor = '#ddd' }) => {
export default ({ style = {}, className, bgColor = '#f8f8f8', nodeColor = '#ddd' }) => {
const canvasNode = useRef(null);
const { state } = useContext(GraphContext);
const mapClasses = classnames('react-graph__minimap', className);