Skip to content

Commit 2982cb8

Browse files
committed
Fixed failed to "Insert Action" in Scripting Snippets Panel
- Reported by Dani Ditu - Closes #3379
1 parent fdbe59b commit 2982cb8

File tree

1 file changed

+7
-2
lines changed
  • src/plugins/core/preferences/panels/scripting

1 file changed

+7
-2
lines changed

src/plugins/core/preferences/panels/scripting/init.lua

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
local require = require
66

7-
--local log = require "hs.logger".new "snippets"
7+
local log = require "hs.logger".new "snippets"
88

99
local hs = _G.hs
1010

@@ -371,7 +371,9 @@ function plugin.init(deps, env)
371371

372372
if type(v) == "table" then
373373
s = s .. key .. "=" .. processTable(v) .. ","
374-
else
374+
elseif type(v) == "number" then
375+
s = s .. key .. "=" .. v .. ","
376+
elseif type(v) == "string" then
375377
--------------------------------------------------------------------------------
376378
-- If the value contains a slash or quotes put it in brackets:
377379
--------------------------------------------------------------------------------
@@ -383,6 +385,9 @@ function plugin.init(deps, env)
383385
end
384386

385387
s = s .. key .. "=" .. value .. ","
388+
else
389+
log.ef("Bug in insertAction - Unknown type: %s ('%s')", type(v), v)
390+
return
386391
end
387392
end
388393
if s:sub(-1) == "," then

0 commit comments

Comments
 (0)