From ac38863e91e45e3d1fda7dd68da611026dec6bde Mon Sep 17 00:00:00 2001 From: Fleeym <61891787+Fleeym@users.noreply.github.com> Date: Sun, 9 Jun 2024 21:56:22 +0300 Subject: [PATCH] fix some code errors in fetch --- tutorials/fetch.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tutorials/fetch.md b/tutorials/fetch.md index 68ff892..a998607 100644 --- a/tutorials/fetch.md +++ b/tutorials/fetch.md @@ -122,8 +122,7 @@ class $modify(MenuLayer) { if (web::WebResponse* res = e->getValue()) { log::info("{}", res->string()->unwrapOr("Uh oh!")); } else if (web::WebProgress* p = e->getProgress()) { - log::info("progress: {}", p->downloadProgress().) - } + log::info("progress: {}", p->downloadProgress().value_or(0.f)); } else if (e->isCancelled()) { log::info("The request was cancelled... So sad :("); }