From 44edd47ca85307e1e4886aea59197c2ccec6f47c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 9 Mar 2021 14:22:33 +0100 Subject: util.jsonschema: Syntax tweak to not upset syntax highlighting That whole condition stanza was shown as angry red, I think it's something with 'enum' being a key word in Teal. --- util/jsonschema.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/jsonschema.lua') diff --git a/util/jsonschema.lua b/util/jsonschema.lua index 0723a45e..ed8c0ccc 100644 --- a/util/jsonschema.lua +++ b/util/jsonschema.lua @@ -118,8 +118,8 @@ local function validate(schema, data) return false end - if schema.enum ~= nil then - for _, v in ipairs(schema.enum) do + if schema["enum"] ~= nil then + for _, v in ipairs(schema["enum"]) do if v == data then return true end -- cgit v1.2.3