From da5ad411cbe6959fd9e36caced528097c8b4df14 Mon Sep 17 00:00:00 2001 From: Travis Dixon Date: Thu, 11 Jan 2024 13:28:13 +1100 Subject: [PATCH] chore: if programmer does not provide type, this upperCase will throw and prevent useful logging Signed-off-by: Travis Dixon --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1070ddd..e487a7a 100644 --- a/index.js +++ b/index.js @@ -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; }