From bc303272997dddead9361e50a4fa0cf487cc3049 Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Thu, 22 Dec 2016 16:54:13 +0100 Subject: [PATCH] Select default value for renderer --- src/components/inputs/StringInput.jsx | 2 +- src/components/modals/SettingsModal.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/inputs/StringInput.jsx b/src/components/inputs/StringInput.jsx index 24c470df..44c222bd 100644 --- a/src/components/inputs/StringInput.jsx +++ b/src/components/inputs/StringInput.jsx @@ -3,7 +3,7 @@ import input from '../../config/input.js' class StringInput extends React.Component { static propTypes = { - value: React.PropTypes.string.isRequired, + value: React.PropTypes.string, style: React.PropTypes.object, onChange: React.PropTypes.func.isRequired, } diff --git a/src/components/modals/SettingsModal.jsx b/src/components/modals/SettingsModal.jsx index 9e3edfe4..6e63b199 100644 --- a/src/components/modals/SettingsModal.jsx +++ b/src/components/modals/SettingsModal.jsx @@ -68,7 +68,7 @@ class SettingsModal extends React.Component { ['mbgljs', 'MapboxGL JS'], ['ol3', 'Open Layers 3'] ]} - value={(this.props.mapStyle.metadata || {})['maputnik:renderer']} + value={(this.props.mapStyle.metadata || {})['maputnik:renderer'] || 'mbgljs'} onChange={this.onRendererChange.bind(this)} />