git » sdk » commit d82f0c9

Require label and value for public API

author Stephen Paul Weber
2025-11-23 19:53:54 UTC
committer Stephen Paul Weber
2025-11-23 19:53:54 UTC
parent 8ad3e187143dc1edb985310e97b164d1714b51d6

Require label and value for public API

borogove/DataForm.hx +4 -4

diff --git a/borogove/DataForm.hx b/borogove/DataForm.hx
index 46669c5..dac063e 100644
--- a/borogove/DataForm.hx
+++ b/borogove/DataForm.hx
@@ -211,13 +211,13 @@ class FormField {
 @:build(HaxeSwiftBridge.expose())
 #end
 class FormOption {
-	public final label: Null<String>;
-	public final value: Null<String>;
+	public final label: String;
+	public final value: String;
 
 	@:allow(borogove)
 	private function new(label: Null<String>, value: Null<String>) {
-		this.label = label;
-		this.value = value;
+		this.label = label ?? value;
+		this.value = value ?? "";
 	}
 
 	@:allow(borogove)