From 906cae5e170b2146bcf1decc5f5dc188b0e63ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 26 Dec 2018 16:18:48 +0800 Subject: =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E5=A1=AB=E5=B0=B1=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E5=90=88=E5=B9=B6=E4=B8=8A=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/matcher/library.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/server/src/matcher/library.lua b/server/src/matcher/library.lua index 68ec0fca..b268b368 100644 --- a/server/src/matcher/library.lua +++ b/server/src/matcher/library.lua @@ -16,10 +16,14 @@ local function mergeEnum(lib, locale) end for _, enum in ipairs(locale) do if pack[enum.enum] then - pack[enum.enum].description = enum.description + if enum.description then + pack[enum.enum].description = enum.description + end end if pack[enum.code] then - pack[enum.code].description = enum.description + if enum.description then + pack[enum.code].description = enum.description + end end end end @@ -36,7 +40,9 @@ local function mergeField(lib, locale) end for _, field in ipairs(locale) do if pack[field.field] then - pack[field.field].description = field.description + if field.description then + pack[field.field].description = field.description + end end end end @@ -47,7 +53,9 @@ local function mergeLocale(libs, locale) end for name in pairs(locale) do if libs[name] then - libs[name].description = locale[name].description + if locale[name].description then + libs[name].description = locale[name].description + end mergeEnum(libs[name].enums, locale[name].enums) mergeField(libs[name].fields, locale[name].fields) end -- cgit v1.2.3