Skip to content

Commit 342b4bf

Browse files
committed
Make sure to convert string to url
Fixes #35
1 parent 39d66a5 commit 342b4bf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

in/cursor.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ local listeners = {}
2222
local EMPTY = hash("")
2323

2424
local function url_to_key(url)
25-
url = url or msg.url()
25+
if type(url) == "string" then
26+
url = msg.url(url)
27+
else
28+
url = url or msg.url()
29+
end
2630
return hash_to_hex(url.socket or EMPTY) .. hash_to_hex(url.path or EMPTY) ..hash_to_hex(url.fragment or EMPTY)
2731
end
2832

0 commit comments

Comments
 (0)