Przeglądaj źródła

Added handling for nil Realm property values

Tim Oliver 10 lat temu
rodzic
commit
552e687b9c

+ 2 - 1
Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDatabaseManager.m

@@ -101,7 +101,8 @@
     for (RLMObject *result in results) {
         NSMutableDictionary *entry = [NSMutableDictionary dictionary];
         for (RLMProperty *property in objectSchema.properties) {
-            entry[property.name] = [result valueForKey:property.name];
+            id value = [result valueForKey:property.name];
+            entry[property.name] = (value) ? (value) : [NSNull null];
         }
         
         [allDataEntries addObject:entry];