hookehuyr

refactor(useOfflineBookingCachePolling): 使用 normalize_options 显式处理轮询选项

确保网络监听器中传入的轮询选项经过规范化处理,避免潜在的 null/undefined 问题
......@@ -161,7 +161,11 @@ const ensure_network_listener = async () => {
// 网络恢复时,确保轮询正在运行(处理之前因网络不可用而可能停止的轮询)
if (polling_state.network_usable && should_run_polling()) {
// 传入 restart: true,支持重启逻辑
start_offline_booking_cache_polling({ ...(polling_state.last_options || {}), restart: true })
// 使用 normalize_options 显式处理 null/undefined,语义更清晰
start_offline_booking_cache_polling({
...normalize_options(polling_state.last_options),
restart: true
})
}
}
......