Fix non-probing of union array failure

Probing a union match for an possible value should rarely hard-fail. Instead,
it should return an .{.invalid = {}} response to let the prober decide how to
proceed. This fixes a hard-fail when a JS value fails to probe as an array.

Also, add :modal pseudo-class.

(both issues came up looking at github integration)
This commit is contained in:
Karl Seguin
2025-06-16 17:07:43 +08:00
parent e2542f41b5
commit 329bffb127
3 changed files with 4 additions and 1 deletions

View File

@@ -1158,7 +1158,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
}
if (!js_value.isArray()) {
return error.InvalidArgument;
return .{.invalid = {}};
}
// This can get tricky.