From cb8ca91e9e00f90f2ee1701749c9b091ec9a6fdc Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 16 Dec 2024 18:10:36 -0500 Subject: [PATCH] Resolve warning --- FirebaseRemoteConfig/SwiftNew/ConfigSettings.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FirebaseRemoteConfig/SwiftNew/ConfigSettings.swift b/FirebaseRemoteConfig/SwiftNew/ConfigSettings.swift index 387d13458fb..990c69e2002 100644 --- a/FirebaseRemoteConfig/SwiftNew/ConfigSettings.swift +++ b/FirebaseRemoteConfig/SwiftNew/ConfigSettings.swift @@ -328,12 +328,12 @@ let RCNHTTPDefaultConnectionTimeout: TimeInterval = 60 /// Updates the metadata table with the current fetch status. /// @param fetchSuccess True if fetch was successful. @objc public func updateMetadata(withFetchSuccessStatus fetchSuccess: Bool, - templateVersion: String) { + templateVersion: String?) { RCLog.debug("I-RCN000056", "Updating metadata with fetch result.") updateFetchTime(success: fetchSuccess) _lastFetchStatus = fetchSuccess ? .success : .failure _lastFetchError = RemoteConfigError(fetchSuccess ? .unknown : .internalError) - if fetchSuccess { + if fetchSuccess, let templateVersion { updateLastFetchTimeInterval(Date().timeIntervalSince1970) // Note: We expect the googleAppID to always be available. _deviceContext = Device.remoteConfigDeviceContext(with: _googleAppID)