From 93521df3932b45396fdd3d06718bb7996e6a984a Mon Sep 17 00:00:00 2001 From: Alessio Date: Sun, 16 Jul 2023 19:44:53 +0100 Subject: [PATCH] fix(github): filter out numbers from timestamp util --- lua/gitsigns/util.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/gitsigns/util.lua b/lua/gitsigns/util.lua index 895a1ee0a..3fd361e93 100644 --- a/lua/gitsigns/util.lua +++ b/lua/gitsigns/util.lua @@ -228,9 +228,13 @@ end --- Converts a DateTime string into its timestamp --- ---- @param dateTime string +--- @param dateTime string|number --- @return number? The timestamp function get_timestamp_from_datetime(dateTime) + if (type(dateTime) == 'number') then + return nil + end + local inYear, inMonth, inDay, inHour, inMinute, inSecond, inZone = string.match(dateTime, '^(%d%d%d%d)-(%d%d)-(%d%d)T(%d%d):(%d%d):(%d%d)(.-)$')