Skip to content

Commit

Permalink
stringify integer value for string field
Browse files Browse the repository at this point in the history
  • Loading branch information
amitguptagwl committed Jul 3, 2018
1 parent d731c0c commit 2deba27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/nimn.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,10 @@ StringType.prototype._encode = function (v){
return chars.nilPremitive;
}else if(v === ""){
return chars.emptyPremitive;
}else{
v = "" + v;
return this._sanitize(v);
}
//return stringValues[v] || sanitize(v);
};
StringType.prototype._decode = function(v,i){
if( inRange(v[i])){
Expand Down
4 changes: 3 additions & 1 deletion src/stringType.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ StringType.prototype._encode = function (v){
return chars.nilPremitive;
}else if(v === ""){
return chars.emptyPremitive;
}else{
v = "" + v;
return this._sanitize(v);
}
//return stringValues[v] || sanitize(v);
};
StringType.prototype._decode = function(v,i){
if( inRange(v[i])){
Expand Down

0 comments on commit 2deba27

Please sign in to comment.