Skip to content

Commit fc758ec

Browse files
authored
Merge pull request #23 from CodingCarlos/develop
Fix "undefined" parsed on undefined string
2 parents 892827d + 3a4ce1a commit fc758ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/modifiers/type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function modify(data, model) {
1717

1818
switch (model.type.toLowerCase()) {
1919
case 'string':
20-
parsed = String(data);
20+
parsed = (data) ? String(data) : '';
2121
break;
2222
case 'number':
2323
if (!isNaN(Number(data))) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modelate",
3-
"version": "0.2.7",
3+
"version": "0.2.8",
44
"description": "A simple data modeling tool for NodeJS",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)