mirror of
https://github.com/maputnik/editor.git
synced 2026-08-27 15:37:27 +00:00
Do not generate created timestamp
This commit is contained in:
+1
-7
@@ -19,12 +19,6 @@ function ensureHasId(style) {
|
|||||||
return style
|
return style
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensureHasTimestamp(style) {
|
|
||||||
if('created' in style) return style
|
|
||||||
style.created = new Date().toJSON()
|
|
||||||
return style
|
|
||||||
}
|
|
||||||
|
|
||||||
function ensureHasNoRefs(style) {
|
function ensureHasNoRefs(style) {
|
||||||
const derefedStyle = {
|
const derefedStyle = {
|
||||||
...style,
|
...style,
|
||||||
@@ -34,7 +28,7 @@ function ensureHasNoRefs(style) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ensureStyleValidity(style) {
|
function ensureStyleValidity(style) {
|
||||||
return ensureHasNoRefs(ensureHasId(ensureHasTimestamp(style)))
|
return ensureHasNoRefs(ensureHasId(style))
|
||||||
}
|
}
|
||||||
|
|
||||||
function indexOfLayer(layers, layerId) {
|
function indexOfLayer(layers, layerId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user