Skip to content

Commit d296786

Browse files
committed
Fixed a bug where you could set a null event reference id
1 parent 87fb02c commit d296786

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Shared/EventBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public EventBuilder SetEventReference(string name, string id) {
6262
if (String.IsNullOrEmpty(name))
6363
throw new ArgumentNullException(nameof(name));
6464

65-
if (!IsValidIdentifier(id))
65+
if (!IsValidIdentifier(id) || String.IsNullOrEmpty(id))
6666
throw new ArgumentException("Id must contain between 8 and 100 alphanumeric or '-' characters.", nameof(id));
6767

6868
Target.SetProperty($"@ref:{name}", id);

0 commit comments

Comments
 (0)