mirror of
https://github.com/maputnik/editor.git
synced 2026-01-04 20:40:01 +00:00
Allow removal of properties.
This commit is contained in:
@@ -31,7 +31,11 @@ export function changeProperty(layer, group, property, newValue) {
|
||||
if(newValue === undefined) {
|
||||
if(group) {
|
||||
const newLayer = {
|
||||
...layer
|
||||
...layer,
|
||||
// Change object so the diff works in ./src/components/map/MapboxGlMap.jsx
|
||||
[group]: {
|
||||
...layer[group]
|
||||
}
|
||||
};
|
||||
delete newLayer[group][property];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user