소스 검색

Added handling for nil Realm property values

Tim Oliver 10 년 전
부모
커밋
552e687b9c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDatabaseManager.m

+ 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];