From c84edeed9d9b7f17ef3519dcc56a01e9e8846427 Mon Sep 17 00:00:00 2001 From: wwwcg Date: Fri, 25 Oct 2024 21:04:12 +0800 Subject: [PATCH] build(ios): fix build error due to std::any_cast --- driver/js/src/modules/ui_layout_module.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/js/src/modules/ui_layout_module.cc b/driver/js/src/modules/ui_layout_module.cc index 3b44c04e62a..ee7c743e627 100644 --- a/driver/js/src/modules/ui_layout_module.cc +++ b/driver/js/src/modules/ui_layout_module.cc @@ -49,7 +49,8 @@ inline namespace module { GEN_INVOKE_CB(LayoutModule, ResetLayoutCache) void LayoutModule::ResetLayoutCache(CallbackInfo& info, void* data) { - auto scope_wrapper = reinterpret_cast(std::any_cast(info.GetSlot())); + std::any slot_any = info.GetSlot(); + auto scope_wrapper = reinterpret_cast(std::any_cast(&slot_any)); auto scope = scope_wrapper->scope.lock(); FOOTSTONE_CHECK(scope); if (!scope) {