@oino-ts/common 0.1.3 → 0.2.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/common",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
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.1.3"
22
+ "@oino-ts/types": "0.2.0"
23
23
  },
24
24
  "files": [
25
25
  "src/*.ts",
@@ -156,7 +156,7 @@ export class OINOHtmlTemplate {
156
156
  * @param includeDebugMessages include debug messages in result
157
157
  *
158
158
  */
159
- renderFromResult(result:OINOResult, removeUnusedTags:boolean=true, messageSeparator:string, includeErrorMessages:boolean=false, includeWarningMessages:boolean=false, includeInfoMessages:boolean=false, includeDebugMessages:boolean=false):OINOHttpResult {
159
+ renderFromResult(result:OINOResult, removeUnusedTags:boolean=true, messageSeparator:string = "", includeErrorMessages:boolean=false, includeWarningMessages:boolean=false, includeInfoMessages:boolean=false, includeDebugMessages:boolean=false):OINOHttpResult {
160
160
  OINOBenchmark.start("OINOHtmlTemplate", "renderFromResult")
161
161
  this.setVariableFromValue("statusCode", result.statusCode.toString())
162
162
  this.setVariableFromValue("statusMessage", result.statusMessage.toString())
@@ -176,7 +176,7 @@ export class OINOHtmlTemplate {
176
176
  }
177
177
 
178
178
  }
179
- if (messages.length > 0) {
179
+ if (messageSeparator && (messages.length > 0)) {
180
180
  this.setVariableFromValue("messages", messages.join(messageSeparator), false) // messages have been escaped already
181
181
  }
182
182
  const http_result:OINOHttpResult = this.render(removeUnusedTags)