wingbot 3.47.0 → 3.47.2

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": "wingbot",
3
- "version": "3.47.0",
3
+ "version": "3.47.2",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -582,15 +582,14 @@ class ConversationTester {
582
582
  let err = error;
583
583
 
584
584
  const prefix = typeof textCase.rowNum === 'number'
585
- ? ` > FAILED on row ${textCase.rowNum}: `.padEnd(23, ' ')
586
- : ' > FAILED: ';
585
+ ? ` > FAILED on row ${textCase.rowNum}: `.padEnd(23, ' ')
586
+ : ' > FAILED: ';
587
587
 
588
588
  if (Array.isArray(err)) {
589
- const pad = ''.padEnd(prefix.length, ' ');
590
- err = err.join(`\n${pad}`);
589
+ err = err.join('\n ');
591
590
  }
592
591
 
593
- o += `\n${prefix}${err}`;
592
+ o += `\n${prefix}${err}\n`;
594
593
 
595
594
  return { ok, o };
596
595
  };
@@ -64,7 +64,7 @@ const stringToNumber = (string) => {
64
64
  };
65
65
 
66
66
  const toNumber = (value) => {
67
- if (value === undefined) return 0;
67
+ if (value === undefined || value === null) return 0;
68
68
  if (typeof value === 'number') return value;
69
69
  if (Array.isArray(value)) return value.length;
70
70
  return (isStringNumber(value) ? stringToNumber(value) : Number.parseFloat(value));