Skip to content

Commit 8432589

Browse files
Update parse_relation.dart
1 parent 7cf98c5 commit 8432589

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/dart/lib/src/objects/parse_relation.dart

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ part of flutter_parse_sdk;
33
// ignore_for_file: always_specify_types
44
class ParseRelation<T extends ParseObject> {
55
ParseRelation({required ParseObject parent, required String key}) {
6+
if (!parent.containsKey(key)) {
7+
throw 'Invalid Relation key name';
8+
}
69
_targetClass = parent.get<ParseRelation>(key)!.getTargetClass;
710
_parent = parent;
811
_key = key;

0 commit comments

Comments
 (0)