From 8ee9526d3b73fc344c97206ead22469d31e70a37 Mon Sep 17 00:00:00 2001 From: Uriel Gomez Date: Sat, 2 Dec 2023 19:51:57 -0600 Subject: [PATCH] * xover.Source.fetch - type check added --- xo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xo.js b/xo.js index 6b1b89b..c16cdbd 100644 --- a/xo.js +++ b/xo.js @@ -2342,10 +2342,10 @@ xover.Source = function (tag) { let source = sources.shift(); if (!source) continue; let parameters = {}.constructor === definition.constructor && definition[source] || args; - source = ('${') !== -1 ? eval("`" + source + "`") : source; + source = typeof (source) == 'string' && source.indexOf('${') !== -1 ? eval("`" + source + "`") : source; //parameters = parameters.concat(args); - if (source.replace(/^server:/, '') in xover.server || existsFunction(source)) { + if (typeof (source) == 'string' && source.replace(/^server:/, '') in xover.server || existsFunction(source)) { if (parameters.constructor === {}.constructor) { parameters = Object.entries(parameters) || parameters }