1
0
Fork 0
mirror of https://github.com/jiriks74/presence.nvim synced 2025-06-17 19:08:57 +02:00

Guard against invalid log messages

Resolves #28
This commit is contained in:
Andrew Kwon 2021-07-21 22:50:57 -07:00
parent 080d24394b
commit a68355145c
2 changed files with 5 additions and 6 deletions
lua/lib

View file

@ -21,7 +21,7 @@ for i = 1, #Log.levels do
Log[level] = function(self, message)
-- Skip if log level is not set or the log is below the configured or default level
if not self.level or self.codes[level] < self.codes[self.level] then
if not self.level or self.codes[level] < self.codes[self.level] or type(message) ~= "string" then
return
end