From f61f89410f1ddab36333670ef43620f7fe322624 Mon Sep 17 00:00:00 2001 From: moklick Date: Mon, 5 Aug 2019 17:24:17 +0200 Subject: [PATCH] fix(minimap): dont crash when there are no styles --- src/Plugins/MiniMap/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plugins/MiniMap/index.js b/src/Plugins/MiniMap/index.js index 65bc19d1..8a9552d8 100644 --- a/src/Plugins/MiniMap/index.js +++ b/src/Plugins/MiniMap/index.js @@ -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);