From ca2040d4293861d99c78c85e4cc083a5f829d6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 5 May 2018 16:55:58 +0200 Subject: [PATCH] fix: undefined res.meta.values --- code/Global/Global.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/Global/Global.js b/code/Global/Global.js index 2708f45a..6a591a36 100644 --- a/code/Global/Global.js +++ b/code/Global/Global.js @@ -782,13 +782,10 @@ function list_macro(param, id, limit) { * @example <% value foo %> Renders the value of res.meta.value.foo */ function value_macro(param, name, value) { - if (!name) { - return; - } + if (!name) return; + if (!res.meta.values) res.meta.values = {}; name = name.toLowerCase(); - if (!value) { - return res.meta.values[name]; - } + if (!value) return res.meta.values[name]; res.meta.values[name] = value; return; }