Skip to content

Commit 1c23327

Browse files
committed
Fixed F.convert
1 parent c8aa097 commit 1c23327

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,14 +826,19 @@ Framework.prototype.convert = function(value, convertor) {
826826
else if (typeof(convertor) === 'string') {
827827
switch (convertor.toLowerCase()) {
828828
case 'json':
829-
return U.parseJSON;
829+
convertor = U.parseJSON;
830+
break;
830831
case 'float':
831832
case 'number':
832833
case 'double':
833-
return U.parseFloat;
834+
convertor = U.parseFloat;
835+
break;
834836
case 'int':
835837
case 'integer':
836-
return U.parseInt2;
838+
convertor = U.parseInt2;
839+
break;
840+
default:
841+
return console.log('F.convert unknown convertor type:', convertor);
837842
}
838843
}
839844

0 commit comments

Comments
 (0)