File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 11<!-- markdownlint-disable MD024 -->
22# Changelog
33
4+ # [ 1.0.0-preview.20] - 2025-01-16
5+
6+ - Check if a string prop is set instead of inspecting the contents of the string
7+
48# [ 1.0.0-preview.15] - 2024-12-18
59
610- Emit dynamic props via ` onUpdateDynamicProps `
Original file line number Diff line number Diff line change @@ -94,15 +94,13 @@ export function integerPropErrors(opts: ValidationOpts<ConfigurablePropInteger>)
9494}
9595
9696export function stringPropErrors ( opts : ValidationOpts < ConfigurablePropString > ) : string [ ] | undefined {
97- const _value = valueFromOption ( opts . value )
97+ const {
98+ prop, value : valueOpt ,
99+ } = opts
98100
99- if ( ! opts . prop . default ) {
100- if ( typeof _value === "undefined" || _value == null ) {
101- return [
102- "required" ,
103- ]
104- }
105- }
101+ if ( ! prop . default && ( valueOpt == null || typeof value === "undefined" ) ) return [
102+ "required" ,
103+ ]
106104}
107105
108106type AppWithExtractedCustomFields = App & {
You can’t perform that action at this time.
0 commit comments