UNPKG

872 BMarkdownView Raw
1# Patches
2
3## Patch hogan.js for debugging
4
5```diff
6--- template.old 2017-11-26 10:16:35.342614962 +0000
7+++ template.js 2017-11-26 10:14:38.355424901 +0000
8@@ -183,10 +183,11 @@
9 break;
10 }
11 }
12
13 if (!found) {
14+ console.warn(' miss: '+key);
15 return (returnFound) ? false : "";
16 }
17
18 if (!returnFound && typeof val == 'function') {
19 val = this.mv(val, ctx, partials);
20```
21
22## Patch mustache.js for debugging
23
24```diff
25--- mustache.old 2017-11-26 13:56:27.432368300 +0000
26+++ mustache.js 2017-11-23 13:39:14.855455600 +0000
27@@ -425,10 +425,11 @@
28 }
29
30 if (isFunction(value))
31 value = value.call(this.view);
32
33+ if (typeof value === 'undefined') console.warn(' miss',name);
34 return value;
35 };
36
37 /**
38 * A Writer knows how to take a stream of tokens and render them to a
39```