Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 9c193bc

Browse files
committed
fix: check if provider name is a string
1 parent 3b46ef0 commit 9c193bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lua/feline/generator.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ local function parse_provider(provider, component)
232232
elseif type(provider) == 'table' then
233233
if not provider.name then
234234
api.nvim_err_writeln("Provider table doesn't have the provider name")
235+
elseif type(provider.name) ~= 'string' then
236+
api.nvim_err_writeln(string.format(
237+
"Expected 'string' for provider name, got '%s' instead",
238+
type(provider.name)
239+
))
235240
elseif not providers[provider.name] then
236241
api.nvim_err_writeln(string.format(
237242
"Provider with name '%s' doesn't exist",

0 commit comments

Comments
 (0)