Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Commit 8893594

Browse files
committed
fix: fix invalid empty lhs
1 parent fdb0ebe commit 8893594

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lua/nvim-devdocs/operations.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,13 @@ M.open = function(entry, bufnr, pattern, float)
245245
vim.keymap.set("n", key, action, { buffer = bufnr, desc = description })
246246
end
247247

248-
set_buf_keymap(
249-
keymaps.open_in_browser,
250-
function() vim.ui.open("https://devdocs.io/" .. slug .. "/" .. entry.link) end,
251-
"Open in the browser"
252-
)
248+
if type(keymaps.open_in_browser) == "string" and keymaps.open_in_browser ~= "" then
249+
set_buf_keymap(
250+
keymaps.open_in_browser,
251+
function() vim.ui.open("https://devdocs.io/" .. slug .. "/" .. entry.link) end,
252+
"Open in the browser"
253+
)
254+
end
253255

254256
plugin_config.after_open(bufnr)
255257
end

0 commit comments

Comments
 (0)