From 1097b8392f799caa0e28334b67293b893beb5910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Thu, 1 Oct 2015 19:17:45 +0200 Subject: Bugfix core.js: fallback JSONization function, resource resolving function. --- js/codeq/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/codeq') diff --git a/js/codeq/core.js b/js/codeq/core.js index 4b03bfb..6b0719b 100644 --- a/js/codeq/core.js +++ b/js/codeq/core.js @@ -5,7 +5,7 @@ // JSON-ization (stringification) function // ================================================================================ - var jsonize = JSON && JSON.stringify || function () { + var jsonize = JSON && JSON.stringify || function (obj) { var t, buffer, i, isFirst; if (null === obj) return 'null'; t = typeof obj; @@ -38,6 +38,7 @@ buffer = [ '{' ]; isFirst = true; for (i in obj) { + if (!obj.hasOwnProperty(i)) continue; if (isFirst) isFirst = false; else buffer.push(','); buffer.push(jsonize(i), ':', jsonize(obj[i])); @@ -296,7 +297,6 @@ branch = branch[fragment]; if (!branch) { codeq.log.error('Resource sub-branch ' + fragment + ' does not exist; resource: "' + resourceName + '", path: "' + templatePath.join('/') + '"'); - code.push('_result.push("data/broken.png");\n'); break; } traversedPath.push(fragment); -- cgit v1.2.1