From a2441284f5d416e79935e1666615633bef6a7df3 Mon Sep 17 00:00:00 2001 From: Patrick O'Sullivan Date: Wed, 28 Aug 2024 16:13:32 -0500 Subject: [PATCH] Fix issue with subscribeOnce to reel's token-link not always returning a value --- desk/app/reel.hoon | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desk/app/reel.hoon b/desk/app/reel.hoon index a51b554e..caea752a 100644 --- a/desk/app/reel.hoon +++ b/desk/app/reel.hoon @@ -108,14 +108,16 @@ =+ !<(token=cord vase) :_ this =/ result=(unit [cord cord]) - ?. (~(has by our-metadata) token) ~ + ?. (~(has by our-metadata) token) `[token ''] `[token (url-for-token vic our.bowl token)] ~[[%pass [%token-link-want token ~] %agent [src.bowl %reel] %poke %reel-give-token-link !>(result)]] %reel-give-token-link =+ !<(result=(unit [cord cord]) vase) ?~ result `this - =/ [token=cord url=cord] u.result :_ this + =/ [token=cord url=cord] u.result + ?: =('' url) + ~[[%give %fact ~[[%token-link (scot %p src.bowl) token ~]] %json !>(~)]] ~[[%give %fact ~[[%token-link (scot %p src.bowl) token ~]] %json !>(s+url)]] == ::