Skip to content

Commit

Permalink
Fix issue with subscribeOnce to reel's token-link not always returnin…
Browse files Browse the repository at this point in the history
…g a value
  • Loading branch information
patosullivan committed Aug 28, 2024
1 parent a3d2aab commit 813d64c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions desk/app/reel.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -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)]]
==
::
Expand Down

0 comments on commit 813d64c

Please sign in to comment.