mirror of
https://github.com/maputnik/editor.git
synced 2026-01-08 14:30:00 +00:00
Fix UI when loading invalid style with duplicate layer ids.
Also fix for throwing error when 2 layers exist with empty strings as ids.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import {formatLayerId} from './util/format';
|
||||
|
||||
class MessagePanel extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -23,7 +24,7 @@ class MessagePanel extends React.Component {
|
||||
const layerId = mapStyle.layers[parsed.data.index].id;
|
||||
content = (
|
||||
<>
|
||||
Layer <span>'{layerId}'</span>: {parsed.data.message}
|
||||
Layer <span>{formatLayerId(layerId)}</span>: {parsed.data.message}
|
||||
{currentLayer.id !== layerId &&
|
||||
<>
|
||||
—
|
||||
|
||||
Reference in New Issue
Block a user