File tree 1 file changed +4
-2
lines changed
src/darwin/Framework/CHIP
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -859,8 +859,10 @@ - (void)_handleReportBegin
859
859
for (MTRClusterPath * clusterPath in clusterPaths) {
860
860
NSNumber * dataVersion = _clusterData[clusterPath].dataVersion ;
861
861
NSDictionary <NSNumber *, MTRDeviceDataValueDictionary> * attributes = [self _attributesForCluster: clusterPath];
862
- MTRDeviceClusterData * clusterData = [[MTRDeviceClusterData alloc ] initWithDataVersion: dataVersion attributes: attributes];
863
- clusterDataToReturn[clusterPath] = clusterData;
862
+ if (dataVersion || attributes) {
863
+ MTRDeviceClusterData * clusterData = [[MTRDeviceClusterData alloc ] initWithDataVersion: dataVersion attributes: attributes];
864
+ clusterDataToReturn[clusterPath] = clusterData;
865
+ }
864
866
}
865
867
866
868
return clusterDataToReturn;
You can’t perform that action at this time.
0 commit comments