node-riner 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +2 -0
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -31,6 +31,7 @@ export default class Ride {
31
31
  this.parsedJson["Root"]["Page"].forEach((page: { [x: string]: { [x: string]: any } }) => {
32
32
  let route = page['@_route']
33
33
  let generatedhtml = Object.keys(page['Content']).map(tags => {
34
+ if (typeof page['Content'][tags] === "string" && typeof page['Content'][tags].match === "function") {
34
35
  let match = page['Content'][tags].match(/{.*}/g)
35
36
  // debug
36
37
 
@@ -44,6 +45,7 @@ export default class Ride {
44
45
  // debug
45
46
  page['Content'][tags] = page['Content'][tags].replace(/{.*}/, out)
46
47
  }
48
+ }
47
49
  // debug
48
50
  return `<${tags}>${page['Content'][tags]}</${tags}>`
49
51
  }).join('')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-riner",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",