@oino-ts/common 0.8.2 → 0.8.3

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.
@@ -103,7 +103,9 @@ class OINOHtmlTemplate {
103
103
  *
104
104
  */
105
105
  render(removeUnusedTags = true) {
106
- return this._createHttpResult(this._renderHtml(), removeUnusedTags);
106
+ const html = this._renderHtml();
107
+ this.clearVariables(); // clear variables after rendering
108
+ return this._createHttpResult(html, removeUnusedTags);
107
109
  }
108
110
  /**
109
111
  * Creates HTML Response from a key-value-pair.
@@ -100,7 +100,9 @@ export class OINOHtmlTemplate {
100
100
  *
101
101
  */
102
102
  render(removeUnusedTags = true) {
103
- return this._createHttpResult(this._renderHtml(), removeUnusedTags);
103
+ const html = this._renderHtml();
104
+ this.clearVariables(); // clear variables after rendering
105
+ return this._createHttpResult(html, removeUnusedTags);
104
106
  }
105
107
  /**
106
108
  * Creates HTML Response from a key-value-pair.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/common",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "OINO TS package for common classes.",
5
5
  "author": "Matias Kiviniemi (pragmatta)",
6
6
  "license": "MPL-2.0",
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  },
21
21
  "devDependencies": {
22
- "@oino-ts/types": "0.8.2"
22
+ "@oino-ts/types": "0.8.3"
23
23
  },
24
24
  "files": [
25
25
  "src/*.ts",
@@ -110,7 +110,9 @@ export class OINOHtmlTemplate {
110
110
  *
111
111
  */
112
112
  render(removeUnusedTags:boolean = true):OINOHttpResult {
113
- return this._createHttpResult(this._renderHtml(), removeUnusedTags)
113
+ const html:string = this._renderHtml()
114
+ this.clearVariables() // clear variables after rendering
115
+ return this._createHttpResult(html, removeUnusedTags)
114
116
  }
115
117
 
116
118
  /**