mirror of
https://github.com/maputnik/editor.git
synced 2026-06-22 15:17:29 +00:00
Remove JSON.stringify in call to validate
This commit is contained in:
@@ -97,9 +97,7 @@ CodeMirror.registerHelper("lint", "mgl", function(text, opts, doc) {
|
|||||||
let out;
|
let out;
|
||||||
if (context === "layer") {
|
if (context === "layer") {
|
||||||
// Just an empty style so we can validate a layer.
|
// Just an empty style so we can validate a layer.
|
||||||
// TODO: this seems to be a hack caused by TypeScript or something causing issues.
|
const errors = validate({
|
||||||
// TODO: Needs to be investigated and fixed.
|
|
||||||
const errors = validate(JSON.stringify({
|
|
||||||
"version": 8,
|
"version": 8,
|
||||||
"name": "Empty Style",
|
"name": "Empty Style",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
@@ -109,7 +107,7 @@ CodeMirror.registerHelper("lint", "mgl", function(text, opts, doc) {
|
|||||||
"layers": [
|
"layers": [
|
||||||
input
|
input
|
||||||
]
|
]
|
||||||
}));
|
});
|
||||||
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
out = {
|
out = {
|
||||||
|
|||||||
Reference in New Issue
Block a user