summaryrefslogtreecommitdiff
path: root/js/codeq
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-10-01 19:17:45 +0200
committerAleš Smodiš <aless@guru.si>2015-10-01 19:17:45 +0200
commit1097b8392f799caa0e28334b67293b893beb5910 (patch)
tree97f5e6636f843d2fbcbbe6ff9f31ca8c50fed28d /js/codeq
parent7d0efb9985656d7f5a51671cc1bfda7417d133ee (diff)
Bugfix core.js: fallback JSONization function, resource resolving function.
Diffstat (limited to 'js/codeq')
-rw-r--r--js/codeq/core.js4
1 files changed, 2 insertions, 2 deletions
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);