mirror of
https://github.com/maputnik/editor.git
synced 2026-01-05 21:10:02 +00:00
Fall back to defaut style
This commit is contained in:
@@ -9,6 +9,7 @@ import request from 'request'
|
||||
import FileUploadIcon from 'react-icons/lib/md/file-upload'
|
||||
import AddIcon from 'react-icons/lib/md/add-circle-outline'
|
||||
|
||||
import style from '../../libs/style.js'
|
||||
import colors from '../../config/colors'
|
||||
import { margins, fontSizes } from '../../config/scales'
|
||||
import publicStyles from '../../config/styles.json'
|
||||
@@ -75,7 +76,7 @@ class OpenModal extends React.Component {
|
||||
withCredentials: false,
|
||||
}, (error, response, body) => {
|
||||
if (!error && response.statusCode == 200) {
|
||||
const mapStyle = JSON.parse(body)
|
||||
const mapStyle = style.ensureMetadataExists(JSON.parse(body))
|
||||
console.log('Loaded style ', mapStyle.id)
|
||||
this.props.onStyleOpen(mapStyle)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user