From 342b4bffe15c8bb627dfae7182e127623c06d690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Sun, 30 Jul 2023 08:29:41 +0200 Subject: [PATCH] Make sure to convert string to url Fixes #35 --- in/cursor.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/in/cursor.lua b/in/cursor.lua index 59ef1fe..3c4ef9e 100644 --- a/in/cursor.lua +++ b/in/cursor.lua @@ -22,7 +22,11 @@ local listeners = {} local EMPTY = hash("") local function url_to_key(url) - url = url or msg.url() + if type(url) == "string" then + url = msg.url(url) + else + url = url or msg.url() + end return hash_to_hex(url.socket or EMPTY) .. hash_to_hex(url.path or EMPTY) ..hash_to_hex(url.fragment or EMPTY) end