Skip to content

Commit

Permalink
chore: if programmer does not provide type, this upperCase will throw…
Browse files Browse the repository at this point in the history
… and prevent useful logging
  • Loading branch information
thetrav committed Jan 11, 2024
1 parent 1f9e971 commit 23bffab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var Base = Class.extend({
case type.SMALLINT:
return 'SMALLINT';
default:
var unknownType = str.toUpperCase();
var unknownType = typeof str === 'string' ? str.toUpperCase() : str;
log.warn('Using unknown data type', unknownType);
return unknownType;
}
Expand Down

0 comments on commit 23bffab

Please sign in to comment.