schema-components 1.12.5 → 1.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -147,10 +147,9 @@ function renderField(tree, value, onChange, userResolver, renderChild, instanceW
|
|
|
147
147
|
} catch (err) {
|
|
148
148
|
throw new SchemaRenderError(err instanceof Error ? err.message : `Render function threw for type "${tree.type}"`, tree, tree.type, err);
|
|
149
149
|
}
|
|
150
|
-
if (result
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
150
|
+
if (result === null || result === void 0) return null;
|
|
151
|
+
if (isValidElement(result)) return result;
|
|
152
|
+
if (typeof result === "string" || typeof result === "number") return result;
|
|
154
153
|
}
|
|
155
154
|
if (value === void 0 || value === null) return /* @__PURE__ */ jsx("span", { children: "—" });
|
|
156
155
|
return /* @__PURE__ */ jsx("span", { children: typeof value === "string" ? value : JSON.stringify(value) });
|