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) {